FIX: : trigger user_updated event only if email changed after user creation.

Follow-up to 1460d7957c5d9b9300034e5e36675cf44cc3bc0f
This commit is contained in:
Vinoth Kannan
2020-07-16 18:21:30 +05:30
parent 29788f2c26
commit 3252cb847c
7 changed files with 40 additions and 27 deletions

View File

@ -121,6 +121,7 @@ class EmailUpdater
@user.user_emails.create!(email: new_email)
end
DiscourseEvent.trigger(:user_updated, @user)
@user.set_automatic_groups
end