diff options
Diffstat (limited to '')
| -rw-r--r-- | app/class/user.class.php | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/app/class/user.class.php b/app/class/user.class.php index 4f1bbfe..75b769a 100644 --- a/app/class/user.class.php +++ b/app/class/user.class.php @@ -99,8 +99,7 @@ class User extends Object          $this->perms = 0;          $this->name = $username;          $this->type = "user"; -        $this->salt = $this->getBlob(); -        $this->key = $this->getKey($password, $this->salt); +        $this->setPassword($password);          $this->emailConf = 0;          $this->emailConfKey = $this->getBlob(); @@ -122,6 +121,15 @@ class User extends Object      }      /* +     * Overwrite the salt and key for this user, given a new plaintext password +     */ +    function setPassword($password) +    { +        $this->salt = $this->getBlob(); +        $this->key = $this->getKey($password, $this->salt); +    } + +    /*       * If a user has an alias set, display it instead of their username       */      function getDisplayName() | 
