diff options
author | kaiyou <pierre@jaury.eu> | 2020-04-30 14:39:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 14:39:05 +0200 |
commit | 3511528e508aa365e7f88b7e3b6a3b8f99c531cc (patch) | |
tree | 013a60322c45c1eb42c9fb04eea248fffc26c2c3 /app/models | |
parent | b8ba977497a53740e66d8db9938382b724283b3a (diff) |
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
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/omniauthable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/omniauthable.rb b/app/models/concerns/omniauthable.rb index 960784222..736da6c1d 100644 --- a/app/models/concerns/omniauthable.rb +++ b/app/models/concerns/omniauthable.rb @@ -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 |