commit 3577ccc4d165cb0b85b1db2d22f1a722a0eedad2 Author: smarcet Date: Thu Oct 15 11:19:26 2020 -0300 Fixed on empty password_enc condition Change-Id: Ic47f2a390c3ebc6067298b2e23ac842cc16bbcd7 Signed-off-by: smarcet diff --git a/app/libs/Auth/Models/User.php b/app/libs/Auth/Models/User.php index c208cd9..94eb441 100644 --- a/app/libs/Auth/Models/User.php +++ b/app/libs/Auth/Models/User.php @@ -1191,6 +1191,9 @@ class User extends BaseEntity */ public function setPassword(string $password): void { + if(empty($this->password_enc)){ + $this->password_enc = AuthHelper::AlgNative; + } $this->password_salt = AuthHelper::generateSalt(self::SaltLen, $this->password_enc); $this->password = AuthHelper::encrypt_password($password, $this->password_salt, $this->password_enc); }