mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
fix: keep phone/email unique. (#1038)
Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com> Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com>
This commit is contained in:
@ -62,10 +62,10 @@ func CheckUserSignup(application *Application, organization *Organization, usern
|
|||||||
if HasUserByField(organization.Name, "name", username) {
|
if HasUserByField(organization.Name, "name", username) {
|
||||||
return "username already exists"
|
return "username already exists"
|
||||||
}
|
}
|
||||||
if HasUserByField(organization.Name, "email", username) {
|
if HasUserByField(organization.Name, "email", email) {
|
||||||
return "email already exists"
|
return "email already exists"
|
||||||
}
|
}
|
||||||
if HasUserByField(organization.Name, "phone", username) {
|
if HasUserByField(organization.Name, "phone", phone) {
|
||||||
return "phone already exists"
|
return "phone already exists"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user