Restrict to confirmed users and allow memoization of unkonwn e-mails

This commit is contained in:
Stan Hu 2018-07-28 22:25:10 -07:00
parent a5722c378b
commit 7b23b55005

View file

@ -64,8 +64,8 @@ module Gitlab
return users[email] if users.key?(email)
user = User.find_by_any_email(email)
users[email] = user&.id if user
user = User.find_by_any_email(email, confirmed: true)
users[email] = user&.id
user&.id
end