summaryrefslogtreecommitdiff
path: root/lib/gitlab/gl_id.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/gl_id.rb')
-rw-r--r--lib/gitlab/gl_id.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/gl_id.rb b/lib/gitlab/gl_id.rb
index 624fd00367e..a53d156b41f 100644
--- a/lib/gitlab/gl_id.rb
+++ b/lib/gitlab/gl_id.rb
@@ -2,10 +2,14 @@ module Gitlab
module GlId
def self.gl_id(user)
if user.present?
- "user-#{user.id}"
+ gl_id_from_id_value(user.id)
else
- ""
+ ''
end
end
+
+ def self.gl_id_from_id_value(id)
+ "user-#{id}"
+ end
end
end