mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix bug that username will be random with useEmailAsUsername enabled (#3793)
This commit is contained in:
parent
702b390da1
commit
d772b0b7a8
@ -837,7 +837,7 @@ func AddUser(user *User) (bool, error) {
|
||||
return false, fmt.Errorf("the user's owner and name should not be empty")
|
||||
}
|
||||
|
||||
if CheckUsername(user.Name, "en") != "" {
|
||||
if CheckUsernameWithEmail(user.Name, "en") != "" {
|
||||
user.Name = util.GetRandomName()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user