FEATURE: in result.rb don't use email for username suggestions until enabled in settings (#15586)

This commit is contained in:
Andrei Prigorshnev
2022-02-07 13:02:26 +01:00
committed by GitHub
parent 357186ab7e
commit 404f882e5c
2 changed files with 29 additions and 1 deletions

View File

@@ -196,7 +196,9 @@ class Auth::Result
end
def username_suggester_attributes
[username, name, email]
attributes = [username, name]
attributes << email if SiteSetting.use_email_for_username_and_name_suggestions
attributes
end
def authenticator