summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-24 18:42:50 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-24 18:42:50 -0300
commit2b7328c3171661ce8e4a5b3b840ff5f3df19d3e0 (patch)
treeecee5f80ce276fa79f0d9cfec42ac6a17d0bd1bb /lib
parente50606cd2d0c5a010d3c139cbad1eaf16701d8fd (diff)
downloadgitlab-ce-2b7328c3171661ce8e4a5b3b840ff5f3df19d3e0.tar.gz
Rename find_by_email/find_by_external_uid methods
Diffstat (limited to 'lib')
-rw-r--r--lib/github/import.rb6
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