Commit 02850210 authored by Marin Jankovski's avatar Marin Jankovski

Allow referencing an existing user.

parent 01ec6c79
...@@ -166,8 +166,8 @@ module Gitlab ...@@ -166,8 +166,8 @@ module Gitlab
end end
def reference_user(identifier) def reference_user(identifier)
if member = @project.team_members.find { |user| user.username == identifier } 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 member link_to("@#{identifier}", user_url(identifier), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if user
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment