FIX: wasn't able to use the same username when taking over a staged account

This commit is contained in:
Régis Hanol
2017-12-12 11:26:00 +01:00
parent 7d8cd84fa6
commit 62a5b174e1
3 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ class UsernameCheckerService
end
def check_username_availability(username, email)
if User.username_available?(username)
if User.username_available?(username, email)
{ available: true, is_developer: is_developer?(email) }
else
{ available: false, suggestion: UserNameSuggester.suggest(username) }