public check_password ( string $password ) : boolean | ||
$password | string | |
return | boolean |
public function check_password($password)
{
$user = $this->get_user();
if ($user === FALSE) {
// nothing to compare
return FALSE;
}
$hash = $this->hash_password($password, $this->find_salt($user->password));
return $hash == $user->password;
}