diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 00:06:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 00:06:44 +0000 |
commit | 308146dc398fd4c13453048105498018459e0985 (patch) | |
tree | d843eb63c1672e4b18c483907e2cd4aa7fca708e /app/finders | |
parent | 4b28d5ae770c6bd332283a3f13ceae06329c409b (diff) | |
download | gitlab-ce-308146dc398fd4c13453048105498018459e0985.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/user_finder.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/finders/user_finder.rb b/app/finders/user_finder.rb index 556be4c4338..1dd1a27437e 100644 --- a/app/finders/user_finder.rb +++ b/app/finders/user_finder.rb @@ -52,6 +52,12 @@ class UserFinder end end + def find_by_ssh_key_id + return unless input_is_id? + + User.find_by_ssh_key_id(@username_or_id) + end + def input_is_id? @username_or_id.is_a?(Numeric) || @username_or_id =~ /^\d+$/ end |