Commit 11f9979f authored by hangjun83's avatar hangjun83

兼容

parent a828185d
...@@ -50,7 +50,7 @@ class AdminUsersProvider implements UserProvider ...@@ -50,7 +50,7 @@ class AdminUsersProvider implements UserProvider
->first(); ->first();
if($user->status === 0 ){ if($user->status === 0 ){
return throw new AuthenticationException('用户已被禁用,请联系管理员.'); throw new AuthenticationException('用户已被禁用,请联系管理员.');
} }
return $user; return $user;
...@@ -71,7 +71,7 @@ class AdminUsersProvider implements UserProvider ...@@ -71,7 +71,7 @@ class AdminUsersProvider implements UserProvider
public function retrieveByCredentials(array $credentials) public function retrieveByCredentials(array $credentials)
{ {
if (empty($credentials)) { if (empty($credentials)) {
return throw new UnauthorizedHttpException('auth params error','参数缺少',null,ResponseCodeEnum::CLIENT_PARAMETER_ERROR); throw new UnauthorizedHttpException('auth params error','参数缺少',null,ResponseCodeEnum::CLIENT_PARAMETER_ERROR);
} }
$query = $this->model->newQuery(); $query = $this->model->newQuery();
...@@ -100,10 +100,10 @@ class AdminUsersProvider implements UserProvider ...@@ -100,10 +100,10 @@ class AdminUsersProvider implements UserProvider
{ {
$encodePassword = $this->model->encryptPassword($credentials['password']); $encodePassword = $this->model->encryptPassword($credentials['password']);
if($encodePassword !== $user->password){ if($encodePassword !== $user->password){
return throw new AuthenticationException('用户登陆密码错误,请重新输入.'); throw new AuthenticationException('用户登陆密码错误,请重新输入.');
} }
if($user->status === 0 ){ if($user->status === 0 ){
return throw new AuthenticationException('用户已被禁用,请联系管理员.'); throw new AuthenticationException('用户已被禁用,请联系管理员.');
} }
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment