mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
feat: fix bug that username will be random with useEmailAsUsername enabled (#3793)
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user