function _gravatar_get_gravatar_image in Gravatar integration 7
Same name and namespace in other branches
- 6 gravatar.module \_gravatar_get_gravatar_image()
Fetch a gravatar image.
Parameters
$mail: A string with an e-mail address.
Return value
An image if the e-mail has a gravatar, FALSE otherwise.
File
- ./
gravatar.module, line 411 - Integrates gravatar service for user pictures.
Code
function _gravatar_get_gravatar_image($mail) {
$url = gravatar_get_gravatar(array(
'mail' => $mail,
'cache' => FALSE,
));
$request = drupal_http_request($url, array(), 'GET', NULL, 0);
return $request->code == '200' ? $request->data : FALSE;
}