fix forget

This commit is contained in:
Tokumeikoi
2020-02-07 19:34:24 +08:00
parent 37844c1bb4
commit 62f7d5b3e8
2 changed files with 4 additions and 0 deletions

View File

@ -176,6 +176,9 @@ class AuthController extends Controller
abort(500, '邮箱验证码有误');
}
$user = User::where('email', $request->input('email'))->first();
if (!$user) {
abort(500, '该邮箱不存在系统中');
}
$user->password = password_hash($request->input('password'), PASSWORD_DEFAULT);
$user->password_algo = NULL;
if (!$user->save()) {