up. ws update.
This commit is contained in:
parent
5682d05f9f
commit
0ba41913f3
@ -52,9 +52,15 @@ class AuthController extends BaseController
|
|||||||
'client_name'=> $client->name,
|
'client_name'=> $client->name,
|
||||||
'user_id' => $this->auth->userId,
|
'user_id' => $this->auth->userId,
|
||||||
])->find();
|
])->find();
|
||||||
if($clientModel) {
|
if($clientModel && $clientModel['is_lock']) {
|
||||||
if($clientModel['lock_password'] !== $password) {
|
if (empty($clientModel['lock_password'])) {
|
||||||
return $this->writeError('密码错误');
|
if(!password_verify($password, $this->auth->getUser()->password)) {
|
||||||
|
return $this->writeError('密码错误');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if($clientModel['lock_password'] !== $password) {
|
||||||
|
return $this->writeError('密码错误');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$clientModel->save(['is_lock'=>0,'lock_password'=>'','lock_time'=>null]);
|
$clientModel->save(['is_lock'=>0,'lock_password'=>'','lock_time'=>null]);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user