diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/User.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php index cfbd57f8..c83250c3 100644 --- a/src/Wallabag/CoreBundle/Entity/User.php +++ b/src/Wallabag/CoreBundle/Entity/User.php | |||
@@ -161,7 +161,11 @@ class User implements AdvancedUserInterface, \Serializable | |||
161 | */ | 161 | */ |
162 | public function setPassword($password) | 162 | public function setPassword($password) |
163 | { | 163 | { |
164 | $this->password = $password; | 164 | if (!$password && 0 === strlen($password)) { |
165 | return; | ||
166 | } | ||
167 | |||
168 | $this->password = sha1($password.$this->getUsername().$this->getSalt()); | ||
165 | 169 | ||
166 | return $this; | 170 | return $this; |
167 | } | 171 | } |