X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FWallabag%2FCoreBundle%2FEntity%2FUser.php;h=c83250c37e6d2a2bec25530c1a92667bc72904d1;hb=7ffb1e80bff2c54fe3fe4343484d377eda660c3f;hp=cfbd57f8835049f19b52d5497906b92e0e37a28b;hpb=5f09650eef7bea52b7c54c074c0f873f96e53c86;p=github%2Fwallabag%2Fwallabag.git 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 */ public function setPassword($password) { - $this->password = $password; + if (!$password && 0 === strlen($password)) { + return; + } + + $this->password = sha1($password.$this->getUsername().$this->getSalt()); return $this; }