1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-15 19:42:08 +00:00

Add custom auth encoder & provider

These custom classes allow Wallabag v2 to be compatible with Wallabag v1 salted password
This commit is contained in:
Jeremy 2015-02-08 21:47:36 +01:00
parent 7812f508bc
commit d91691573f
5 changed files with 215 additions and 33 deletions

View file

@ -161,7 +161,11 @@ class User implements AdvancedUserInterface, \Serializable
*/
public function setPassword($password)
{
$this->password = $password;
if (!$password && 0 === strlen($password)) {
return;
}
$this->password = sha1($password.$this->getUsername().$this->getSalt());
return $this;
}