diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 2c80b64b5..8b52a9df8 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php @@ -113,10 +113,10 @@ class Database { $query = $this->executeQuery($sql, array()); } - public function install($login, $password) + public function install($login, $password, $email = '') { $sql = 'INSERT INTO users ( username, password, name, email) VALUES (?, ?, ?, ?)'; - $params = array($login, $password, $login, ' '); + $params = array($login, $password, $login, $email); $query = $this->executeQuery($sql, $params); $sequence = ''; diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index a49413f23..c8a09f30b 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -74,12 +74,13 @@ class Poche /** * Creates a new user */ - public function createNewUser($username, $password) + public function createNewUser($username, $password, $email = "") { if (!empty($username) && !empty($password)){ $newUsername = filter_var($username, FILTER_SANITIZE_STRING); + $email = filter_var($email, FILTER_SANITIZE_STRING); if (!$this->store->userExists($newUsername)){ - if ($this->store->install($newUsername, Tools::encodeString($password . $newUsername))) { + if ($this->store->install($newUsername, Tools::encodeString($password . $newUsername), $email)) { Tools::logm('The new user ' . $newUsername . ' has been installed'); $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to logout ?'), $newUsername)); Tools::redirect(); diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index 2db57d127..6643397a0 100644 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php @@ -107,7 +107,7 @@ class Routing // update password $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']); } elseif (isset($_GET['newuser'])) { - $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']); + $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); } elseif (isset($_GET['deluser'])) { $this->wallabag->deleteUser($_POST['password4deletinguser']); } elseif (isset($_GET['epub'])) { diff --git a/install/index.php b/install/index.php index 1ae782a2b..9ed62de17 100755 --- a/install/index.php +++ b/install/index.php @@ -292,9 +292,11 @@ php composer.phar install
+
- + +
diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig index 46735f074..ccdd2273d 100755 --- a/themes/baggy/config.twig +++ b/themes/baggy/config.twig @@ -138,11 +138,15 @@