Skip to content
Snippets Groups Projects
Unverified Commit 3511528e authored by kaiyou's avatar kaiyou Committed by GitHub
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,7 @@ module Omniauthable
username = starting_username
i = 0
while Account.exists?(username: username)
while Account.exists?(username: username, domain: nil)
i += 1
username = "#{starting_username}_#{i}"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment