diff options
-rw-r--r-- | lib/github/import.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb index de987c263b6..cbda4be2576 100644 --- a/lib/github/import.rb +++ b/lib/github/import.rb @@ -338,19 +338,19 @@ module Github return unless user.present? return cached_user_ids[user.id] if cached_user_ids.key?(user.id) - gitlab_user_id = find_by_external_uid(user.id) || find_by_email(user.email) + gitlab_user_id = user_id_by_external_uid(user.id) || user_id_by_email(user.email) cached_gitlab_users[user.id] = gitlab_user_id.present? cached_user_ids[user.id] = gitlab_user_id || fallback_id end - def find_by_email(email) + def user_id_by_email(email) return nil unless email ::User.find_by_any_email(email)&.id end - def find_by_external_uid(id) + def user_id_by_external_uid(id) return nil unless id identities = ::Identity.arel_table |