up. ws update.
This commit is contained in:
parent
5682d05f9f
commit
0ba41913f3
@ -52,10 +52,16 @@ class AuthController extends BaseController
|
||||
'client_name'=> $client->name,
|
||||
'user_id' => $this->auth->userId,
|
||||
])->find();
|
||||
if($clientModel) {
|
||||
if($clientModel && $clientModel['is_lock']) {
|
||||
if (empty($clientModel['lock_password'])) {
|
||||
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]);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user