diff options
author | Jeremy <jeremy.benoist@gmail.com> | 2015-02-08 21:47:36 +0100 |
---|---|---|
committer | Jeremy <jeremy.benoist@gmail.com> | 2015-02-08 23:13:40 +0100 |
commit | d91691573f108422cc2080462af35ebd62dc93fb (patch) | |
tree | dfef307e3c79e681cbc066c7b18e91f97a294268 /src/Wallabag/CoreBundle/Entity | |
parent | 7812f508bcb68d9d0e1868fa568d7a435e7975b7 (diff) | |
download | wallabag-d91691573f108422cc2080462af35ebd62dc93fb.tar.gz wallabag-d91691573f108422cc2080462af35ebd62dc93fb.tar.zst wallabag-d91691573f108422cc2080462af35ebd62dc93fb.zip |
Add custom auth encoder & provider
These custom classes allow Wallabag v2 to be compatible with Wallabag v1 salted password
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 | } |