]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Poche.class.php
Merge pull request #894 from wallabag/change-password-field
[github/wallabag/wallabag.git] / inc / poche / Poche.class.php
index c80e5d2a972e13bb6e7856fd4367395138d0a01b..ecb2a51f8ea360df44a117241e7e25486a6871b1 100755 (executable)
@@ -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 <a href="?logout">logout ?</a>'), $newUsername));
                     Tools::redirect();
@@ -387,7 +388,7 @@ class Poche
                             $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' ));
                    $tpl_vars['page_links'] = $page_links;
                    $tpl_vars['nb_results'] = $count;
-                   $tpl_vars['search_term'] = $search;
+                   $tpl_vars['searchterm'] = $search;
                 }
                 break;
             case 'view':