feat: fix bug that username will be random with useEmailAsUsername enabled (#3793)

This commit is contained in:
DacongDA
2025-05-16 18:40:50 +08:00
committed by GitHub
parent 702b390da1
commit d772b0b7a8

View File

@ -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()
}