Fixed on empty password_enc condition
Change-Id: Ic47f2a390c3ebc6067298b2e23ac842cc16bbcd7 Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
parent
3c84e475d5
commit
3577ccc4d1
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user