This commit is contained in:
walkor 2022-12-09 11:39:44 +08:00
parent 634d545d12
commit f097119c76

View File

@ -166,6 +166,9 @@ class AccountController extends Crud
if (!$password) { if (!$password) {
return $this->json(2, '密码不能为空'); return $this->json(2, '密码不能为空');
} }
if ($request->post('password_confirm') !== $password) {
return $this->json(3, '两次密码输入不一致');
}
if (!Util::passwordVerify($request->post('old_password'), $hash)) { if (!Util::passwordVerify($request->post('old_password'), $hash)) {
return $this->json(1, '原始密码不正确'); return $this->json(1, '原始密码不正确');
} }