summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--model/user.go7
-rw-r--r--store/sql_user_store.go2
2 files changed, 8 insertions, 1 deletions
diff --git a/model/user.go b/model/user.go
index 7622e48f0..173fe2b4e 100644
--- a/model/user.go
+++ b/model/user.go
@@ -358,6 +358,13 @@ func (u *User) IsSSOUser() bool {
return false
}
+func (u *User) IsLDAPUser() bool {
+ if u.AuthService == USER_AUTH_SERVICE_LDAP {
+ return true
+ }
+ return false
+}
+
func (u *User) PreExport() {
u.Password = ""
u.AuthData = ""
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index 33d1887ad..957921b9e 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -155,7 +155,7 @@ func (us SqlUserStore) Update(user *model.User, allowActiveUpdate bool) StoreCha
if user.IsSSOUser() {
user.Email = oldUser.Email
- } else if user.Email != oldUser.Email {
+ } else if !user.IsLDAPUser() && user.Email != oldUser.Email {
user.EmailVerified = false
}