|
@@ -168,7 +168,8 @@ class Auth extends \ba\Auth
|
|
|
*/
|
|
|
public function login(string $username, string $password, bool $keep = false,&$force=0,&$userId='')//: bool
|
|
|
{
|
|
|
- $this->model = Admin::where('username', $username)->find();
|
|
|
+ $this->model = Admin::where('username', $username)->find()->toArray();
|
|
|
+ var_dump($this->model);die;
|
|
|
if (!$this->model) {
|
|
|
$this->setError('Username is incorrect');
|
|
|
return false;
|
|
@@ -373,7 +374,6 @@ class Auth extends \ba\Auth
|
|
|
{
|
|
|
if (!$this->model) return [];
|
|
|
$info = $this->model->toArray();
|
|
|
- var_dump($info);die;
|
|
|
$info = array_intersect_key($info, array_flip($this->getAllowFields()));
|
|
|
$info['token'] = $this->getToken();
|
|
|
$info['refresh_token'] = $this->getRefreshToken();
|