1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 12:48:00 +02:00

Users Plugin - Improve getGravatarURL() #193

This commit is contained in:
Awilum
2014-01-06 23:59:12 +02:00
parent 2baee12915
commit 15b089f043

View File

@@ -485,10 +485,17 @@ class Users extends Frontend
/**
* Get Gravatar
*
* <code>
* <img src="<?php echo Users::getGravatarURL('monstra@monstra.org', 64); ?>" alt="">
* </code>
*
* @param string $email Email
* @param integer $size Image Size
*/
public static function getGravatarURL($email, $size)
{
return 'http://www.gravatar.com/avatar.php?gravatar_id='.md5($email).'&rating=PG'.'&size='.$size;
return 'http://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?size='.$size;
}
}