mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-08 04:00:51 +08:00
Fix Email duplicated issue in update-user
This commit is contained in:
@@ -419,7 +419,7 @@ func CheckUpdateUser(oldUser, user *User, lang string) string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if oldUser.Email != user.Email {
|
if oldUser.Email != user.Email {
|
||||||
if HasUserByField(user.Name, "email", user.Email) {
|
if HasUserByField(user.Owner, "email", user.Email) {
|
||||||
return i18n.Translate(lang, "check:Email already exists")
|
return i18n.Translate(lang, "check:Email already exists")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user