Require verification after changing email

This commit is contained in:
printempw 2018-07-26 18:22:21 +08:00
parent ebcc693ab4
commit 19e6d8575f

View File

@ -208,6 +208,11 @@ class UserController extends Controller
return json(trans('user.profile.email.wrong-password'), 1);
if ($this->user->setEmail($request->input('new_email'))) {
// Set account status to unverified
$this->user->verified = false;
$this->user->verification_token = '';
$this->user->save();
event(new UserProfileUpdated($action, $this->user));
return json(trans('user.profile.email.success'), 0)