FIX: Don't skip validations when updating user's email.

This commit is contained in:
Guo Xiang Tan 2017-11-08 11:35:53 +08:00
parent 4bb454d889
commit 7777a44673
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class EmailUpdater
confirm_result = :authorizing_new confirm_result = :authorizing_new
when EmailChangeRequest.states[:authorizing_new] when EmailChangeRequest.states[:authorizing_new]
change_req.update_column(:change_state, EmailChangeRequest.states[:complete]) change_req.update_column(:change_state, EmailChangeRequest.states[:complete])
user.primary_email.update_column(:email, token.email) user.primary_email.update!(email: token.email)
confirm_result = :complete confirm_result = :complete
end end
else else