public function getGravatar()
    {
        $siteConfig = SiteConfig::current_site_config();
        $default = '';
        $gravatarSize = '32';
        if ($siteConfig->DefaultGravatarImageID != 0) {
            $default = urlencode(Director::absoluteBaseURL() . $siteConfig->DefaultGravatarImage()->Link());
        } elseif ($siteConfig->DefaultGravatar != '') {
            $default = urlencode($siteConfig->DefaultGravatar);
        }
        if ($siteConfig->GravatarSize) {
            $gravatarSize = $siteConfig->GravatarSize;
        }

        return '//www.gravatar.com/avatar/' . $this->MD5Email . '?default=' . $default . '&amp;s=' . $gravatarSize;
    }
public function getGravatar()
    {
        $siteConfig = SiteConfig::current_site_config();
        $default = '';
        $gravatarSize = '32';
        if ($siteConfig->DefaultGravatarImageID != 0) {
            $default = urlencode(Director::absoluteBaseURL() . $siteConfig->DefaultGravatarImage()->Link());
        } elseif ($siteConfig->DefaultGravatar != '') {
            $default = urlencode($siteConfig->DefaultGravatar);
        }
        if ($siteConfig->GravatarSize) {
            $gravatarSize = $siteConfig->GravatarSize;
        }

        return '//www.gravatar.com/avatar/' . $this->MD5Email . '?default=' . $default . '&amp;s=' . $gravatarSize;
    }
public function getGravatar ( ) { $ siteConfig = SiteConfig :: current_site_config ( ) ; $ default = '' ; $ gravatarSize = '32' ; if ( $ siteConfig -> DefaultGravatarImageID != 0 ) { $ default = urlencode ( Director :: absoluteBaseURL ( ) . $ siteConfig -> DefaultGravatarImage ( ) -> Link ( ) ) ; } elseif ( $ siteConfig -> DefaultGravatar != '' ) { $ default = urlencode ( $ siteConfig -> DefaultGravatar ) ; } if ( $ siteConfig -> GravatarSize ) { $ gravatarSize = $ siteConfig -> GravatarSize ; } return '//www.gravatar.com/avatar/' . $ this -> MD5Email . '?default=' . $ default . '&amp;s=' . $ gravatarSize ; }
Setup the Gravatar, because handling from the template is messy.

@return string $link The link to the Gravatar-file.
Setup the Gravatar because handling from the template is messy .