Commit 02850210b6694983bed0c3eb7ad8dedfc7d95c54
1 parent
01ec6c79
Exists in
spb-stable
and in
3 other branches
Allow referencing an existing user.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/gitlab/markdown.rb
... | ... | @@ -166,8 +166,8 @@ module Gitlab |
166 | 166 | end |
167 | 167 | |
168 | 168 | def reference_user(identifier) |
169 | - if member = @project.team_members.find { |user| user.username == identifier } | |
170 | - link_to("@#{identifier}", user_url(identifier), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if member | |
169 | + if user = User.find_by_username(identifier) | |
170 | + link_to("@#{identifier}", user_url(identifier), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if user | |
171 | 171 | end |
172 | 172 | end |
173 | 173 | ... | ... |