diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-03-25 09:52:27 +0100 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-03-25 18:53:09 +0100 |
commit | 02850210b6694983bed0c3eb7ad8dedfc7d95c54 (patch) | |
tree | d712dba0733b7aee9ee11cc6d9cfb550329c76ca | |
parent | 01ec6c793c533306365319e3bf01174a976352d0 (diff) | |
download | gitlab-ce-02850210b6694983bed0c3eb7ad8dedfc7d95c54.tar.gz |
Allow referencing an existing user.
-rw-r--r-- | lib/gitlab/markdown.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb index 80bb00821f7..1d3c6ac6eea 100644 --- a/lib/gitlab/markdown.rb +++ b/lib/gitlab/markdown.rb @@ -166,8 +166,8 @@ module Gitlab end def reference_user(identifier) - if member = @project.team_members.find { |user| user.username == identifier } - link_to("@#{identifier}", user_url(identifier), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if member + if user = User.find_by_username(identifier) + link_to("@#{identifier}", user_url(identifier), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if user end end |