network view shows wrong avatar if commit maps to secondary email address
Summary
The network view shows no avatar if the email address in a commit maps to a secondary email address.
Steps to reproduce
Create a user with 2 email address: first@example.org & second@example.org The primary email address of the user is first@example.org. The secondary email address of the user is second@example.org Make a commit using the secondary email address. Look at the commit in the network view. The commit will show the default (no-avatar) picture.
Expected behavior
The correct avatar should be shown.
Possible fixes
in file app/helpers/application_helper.rb the user is being searched only by the primary email address. the problem is easily fixed by changing the code to:
def avatar_icon(user_or_email = nil, size = nil, scale = 2) ... user = User.find_by_any_email(user_or_email.downcase) ... end
I'll see if I can still push out a merge request today ...