Look for mentions by login using the existing find_by_login method (#43838).

git-svn-id: https://svn.redmine.org/redmine/trunk@24515 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2026-03-19 06:17:24 +00:00
parent 9e7ee58924
commit f8813c5a49

View File

@@ -1289,12 +1289,12 @@ module ApplicationHelper
link = link_to_project(p, {:only_path => only_path}, :class => 'project')
end
when 'user'
u = User.visible.find_by("LOWER(login) = :s AND type = 'User'", :s => name.downcase)
u = User.visible.find_by_login(name.downcase)
link = link_to_user(u, :only_path => only_path) if u
end
elsif sep == "@"
name = remove_double_quotes(identifier)
u = User.visible.find_by("LOWER(login) = :s AND type = 'User'", :s => name.downcase)
u = User.visible.find_by_login(name.downcase)
link = link_to_mention(u, obj, only_path: only_path) if u
end
end