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.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/gitlab/gl_id.rb b/lib/gitlab/gl_id.rb
new file mode 100644
index 00000000000..624fd00367e
--- /dev/null
+++ b/lib/gitlab/gl_id.rb
@@ -0,0 +1,11 @@
+module Gitlab
+ module GlId
+ def self.gl_id(user)
+ if user.present?
+ "user-#{user.id}"
+ else
+ ""
+ end
+ end
+ end
+end