Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into mantishub-1.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Feb 21, 2015
2 parents c36c317 + 36404d0 commit 1f6ec2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/user_api.php
Expand Up @@ -907,7 +907,11 @@ function user_get_avatar( $p_user_id, $p_size = 80 ) {
$t_default_avatar = urlencode( $t_default_avatar );
$t_rating = 'G';

$t_email_hash = md5( strtolower( trim( user_get_email( $p_user_id ) ) ) );
if ( user_exists( $p_user_id ) ) {
$t_email_hash = md5( strtolower( trim( user_get_email( $p_user_id ) ) ) );
} else {
$t_email_hash = md5( 'generic-avatar-since-user-not-found' );
}

# Build Gravatar URL
if( http_is_protocol_https() ) {
Expand Down

0 comments on commit 1f6ec2c

Please sign in to comment.