src/NukaCode/Users/Presenters/UserPresenter.php
public function gravatar()
    {
        // Check for valid gravatar
        $gravCheck = 'http://www.gravatar.com/avatar/'. md5( strtolower( trim( $this->email ) ) ) .'.png?d=404';
        $response  = get_headers($gravCheck);

        // If a valid gravatar URL is found, use the gravatar image
        if ($response[0] != "HTTP/1.0 404 Not Found"){
            return 'http://www.gravatar.com/avatar/'. md5( strtolower( trim( $this->email ) ) ) .'.png?s=200&d=blank';
        }

        // If no other image is set, use the default
        return '/img/no_user.png';
    }
public function gravatar()
    {
        // Check for valid gravatar
        $gravCheck = 'http://www.gravatar.com/avatar/'. md5( strtolower( trim( $this->email ) ) ) .'.png?d=404';
        $response  = get_headers($gravCheck);

        // If a valid gravatar URL is found, use the gravatar image
        if ($response[0] != "HTTP/1.0 404 Not Found"){
            return 'http://www.gravatar.com/avatar/'. md5( strtolower( trim( $this->email ) ) ) .'.png?s=200&d=blank';
        }

        // If no other image is set, use the default
        return '/img/no_user.png';
    }
public function gravatar ( ) { // Check for valid gravatar
 $ gravCheck = 'http://www.gravatar.com/avatar/' . md5 ( strtolower ( trim ( $ this -> email ) ) ) . '.png?d=404' ; $ response = get_headers ( $ gravCheck ) ; // If a valid gravatar URL is found, use the gravatar image
 if ( $ response [ 0 ] != "HTTP/1.0 404 Not Found" ) { return 'http://www.gravatar.com/avatar/' . md5 ( strtolower ( trim ( $ this -> email ) ) ) . '.png?s=200&d=blank' ; } // If no other image is set, use the default
 return '/img/no_user.png' ; }
Check for an avatar uploaded to the site, resort to gravatar if none exists, resort to no user image if no gravatar exists

@return string
Check for an avatar uploaded to the site resort to gravatar if none exists resort to no user image if no gravatar exists