Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 3511528e rédigé par kaiyou's avatar kaiyou Validation de GitHub
Parcourir les fichiers

Only check locally when deduplicating usernames (#13581)

When deduplicating account usernames for OAuthable users, the routine did check if any account was known with that username, including remote accounts. This caused some unnecessary deduplication, and usernames ending with unexpected trailing _1.
This fixes #13580
parent b8ba9774
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -82,7 +82,7 @@ module Omniauthable ...@@ -82,7 +82,7 @@ module Omniauthable
username = starting_username username = starting_username
i = 0 i = 0
while Account.exists?(username: username) while Account.exists?(username: username, domain: nil)
i += 1 i += 1
username = "#{starting_username}_#{i}" username = "#{starting_username}_#{i}"
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter