mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
fix checking user password returned by event listeners
This commit is contained in:
parent
821cd025e9
commit
1ee3ecd462
@ -73,10 +73,12 @@ class User extends Model
|
||||
$responses = event(new EncryptUserPassword($raw_passwd, $this));
|
||||
|
||||
if (isset($responses[0])) {
|
||||
$this->password = $responses[0];
|
||||
$encrypted = $responses[0];
|
||||
} else {
|
||||
$encrypted = app('cipher')->encrypt($raw_passwd, config('secure.salt'));
|
||||
}
|
||||
|
||||
return (app('cipher')->encrypt($raw_passwd, config('secure.salt')) == $this->password);
|
||||
return ($encrypted == $this->password);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user