X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2Fpoche%2FPoche.class.php;fp=inc%2Fpoche%2FPoche.class.php;h=c8a09f30b9aa5c75665f6774f4e65082ca930a8e;hb=046b9316244c7a3a19446b2425d2370a26246af0;hp=a49413f23816837688ee5b279278a2a9c5bc3d2e;hpb=2b58426b2d4a7f1585d5d7667c0a4fbea4cd29dd;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index a49413f2..c8a09f30 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();