Setting a new password will assign the new salt to current instance of UserEditor
authorAlexander Ebert <ebert@woltlab.com>
Thu, 25 Aug 2011 15:44:19 +0000 (17:44 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 25 Aug 2011 15:44:19 +0000 (17:44 +0200)
wcfsetup/install/files/lib/data/user/UserEditor.class.php

index 945e475b868c121ffa345b32000036521364a50d..39463d4a961420b2ff25738b85fce5fe548ed6a3 100644 (file)
@@ -48,6 +48,9 @@ class UserEditor extends DatabaseObjectEditor {
                if (isset($parameters['password'])) {
                        $parameters['salt'] = StringUtil::getRandomID();
                        $parameters['password'] = StringUtil::getDoubleSaltedHash($parameters['password'], $parameters['salt']);
+                       
+                       // update salt
+                       $this->salt = $parameters['salt'];
                }
                
                parent::update($parameters);