Replace function name
This commit is contained in:
parent
72a628362d
commit
c7606e4d25
1 changed files with 1 additions and 1 deletions
|
@ -390,7 +390,7 @@ func getUserName(gothUser *goth.User) (string, error) {
|
||||||
switch setting.OAuth2Client.Username {
|
switch setting.OAuth2Client.Username {
|
||||||
case setting.OAuth2UsernamePreferredUsername:
|
case setting.OAuth2UsernamePreferredUsername:
|
||||||
username := gothUser.RawData["preferred_username"].(string)
|
username := gothUser.RawData["preferred_username"].(string)
|
||||||
if strings.containsAny(username, "@") {
|
if strings.Contains(username, "@") {
|
||||||
return user_model.NormalizeUserName(strings.Split(username, "@")[0])
|
return user_model.NormalizeUserName(strings.Split(username, "@")[0])
|
||||||
}
|
}
|
||||||
return user_model.NormalizeUserName(username)
|
return user_model.NormalizeUserName(username)
|
||||||
|
|
Loading…
Reference in a new issue