|
@@ -168,9 +168,7 @@ class Auth extends \ba\Auth
|
|
|
*/
|
|
|
public function login(string $username, string $password, bool $keep = false,&$force=0,&$userId='')//: bool
|
|
|
{
|
|
|
- var_dump($username);
|
|
|
$this->model = Admin::where('username', $username)->find();
|
|
|
- var_dump($this->model);die;
|
|
|
if (!$this->model) {
|
|
|
$this->setError('Username is incorrect');
|
|
|
return false;
|
|
@@ -184,6 +182,7 @@ class Auth extends \ba\Auth
|
|
|
$this->setError('Please try again after 1 day');
|
|
|
return false;
|
|
|
}
|
|
|
+ var_dump($this->model->password);die;
|
|
|
if ($this->model->password != encrypt_password($password, $this->model->salt)) {
|
|
|
$this->loginFailed();
|
|
|
$this->setError('Password is incorrect');
|