]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/User.php
replace services.xml into services.yml
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / User.php
index cfbd57f8835049f19b52d5497906b92e0e37a28b..c83250c37e6d2a2bec25530c1a92667bc72904d1 100644 (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;
     }