From f8813c5a49f4d5e04558b8daa9c96ec51efbb3d3 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Thu, 19 Mar 2026 06:17:24 +0000 Subject: [PATCH] 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 --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6f199197a..7fe9d4d9d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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