diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-06 10:17:04 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-06 10:17:04 -0500 |
commit | 51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f (patch) | |
tree | a8d77ba7c6fedbbe63bb8b0da88f19177f44ac51 /store/sql_user_store.go | |
parent | 93a684ca1b0030d2c13fb8e157b9db7c0541f513 (diff) | |
parent | 7eca077877787b0cd9eb7764f46e9eba78fb7382 (diff) | |
download | chat-51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f.tar.gz chat-51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f.tar.bz2 chat-51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f.zip |
Merge pull request #1332 from mattermost/plt-560
PLT-560 Prevent SSO users from changing their email
Diffstat (limited to 'store/sql_user_store.go')
-rw-r--r-- | store/sql_user_store.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/store/sql_user_store.go b/store/sql_user_store.go index 3347df08b..686949a4d 100644 --- a/store/sql_user_store.go +++ b/store/sql_user_store.go @@ -140,7 +140,9 @@ func (us SqlUserStore) Update(user *model.User, allowActiveUpdate bool) StoreCha user.DeleteAt = oldUser.DeleteAt } - if user.Email != oldUser.Email { + if user.IsSSOUser() { + user.Email = oldUser.Email + } else if user.Email != oldUser.Email { user.EmailVerified = false } |