diff options
Diffstat (limited to 'extensions/Gravatar/Extension.pm')
-rw-r--r-- | extensions/Gravatar/Extension.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/extensions/Gravatar/Extension.pm b/extensions/Gravatar/Extension.pm index 050a0c27d..3338790e7 100644 --- a/extensions/Gravatar/Extension.pm +++ b/extensions/Gravatar/Extension.pm @@ -12,6 +12,7 @@ use warnings; use base qw(Bugzilla::Extension); +use Bugzilla::Extension::Gravatar::Data qw( %gravatar_user_map ); use Bugzilla::User::Setting; use Digest::MD5 qw(md5_hex); @@ -27,11 +28,12 @@ sub _user_gravatar { return DEFAULT_URL; } if (!$self->{gravatar}) { - $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . - md5_hex(lc($self->email)) . '?d=mm'; + my $email = $self->email; + $email = $gravatar_user_map{$self->email} if exists $gravatar_user_map{$self->email}; + $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . md5_hex(lc($email)) . '?d=mm'; } $size ||= 64; - return $self->{gravatar} . "&size=$size"; + return $self->{gravatar} . '&size=' . $size; } sub install_before_final_checks { |