Commit 10491c38 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'issue_3780' into 'master'

Downcased user or email search for avatar_icon.

GitLab users are defined with their mail address which is enforced to be lower case. When a commit is listed in the history whose committer mail address is not written in all lower case, the corresponding GitLab user won't be found because the search is case sensitive resp. the mail address to search for not downcased.

Closes #3780 

See merge request !2234
......@@ -72,7 +72,7 @@ def avatar_icon(user_or_email = nil, size = nil, scale = 2)
if user_or_email.is_a?(User)
user = user_or_email
else
user = User.find_by(email: user_or_email)
user = User.find_by(email: user_or_email.downcase)
end
if user
......
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