Returns a url for a gravatar for a given email address

@param  String  $email
@param  Integer $size
@param  String  $rating
@param  String  $default
@param  Boolean $secure
@return String
553476
public function getGravatar($email, $size = null, $rating = null, $default = null, $secure = null)
    {
        $hash = $this->getHash($email);

        $map = array(
            's' => $size ?: $this->settings['size'],
            'r' => $rating ?: $this->settings['rating'],
            'd' => $default ?: $this->settings['default'],
        );

        if (null === $secure) {
            $secure = $this->settings['secure'];
        }

        return ($secure ? 'https://secure' : 'http://www').'.gravatar.com/avatar/'.$hash.'?'.http_build_query(array_filter($map));
    }
696747
public static function getGravatarFromEmail($email ,$width = 80)
    {
        $gravatarURL = "https://gravatar.com/avatar/".md5(strtolower(trim($email))).($width ? '?s='.$width : "");

        return $gravatarURL;
    }
1027495
public function getQRCodeImageAsDataUri($label, $secret, $size = 200)
    {
        if (!is_int($size) || $size <= 0)
            throw new TwoFactorAuthException('Size must be int > 0');

        $qrcodeprovider = $this->getQrCodeProvider();
        return 'data:'
            . $qrcodeprovider->getMimeType()
            . ';base64,'
            . base64_encode($qrcodeprovider->getQRCodeImage($this->getQRText($label, $secret), $size));
    }
950421
public function getUrl($email = null, array $params = [], $secure = true)
    {
        $url  = $secure ? static::SECURE_URL : static::BASE_URL;
        $url .= is_null($email)
            ? str_repeat('0', 32)
            : static::hashEmail($email);

        if ($this->hasFormat())
            $url .= ".{$this->getFormat()}";

        if ( ! empty($params))
            $url .= '?'.http_build_query($params);

        return $url;
    }
428768
protected function getSchemeForUrl($secure)
  {
    if (is_null($secure)) {
      if (is_null($this->cachedScheme)) {
          $this->cachedScheme = $this->plugin->make('request')->getScheme().'://';
      }

      return $this->cachedScheme;
    }

    return $secure ? 'https://' : 'http://';
  }
422258
public function buildAvatar($size = 150)
    {
        $gravatar = new Gravatar();
        $gravatar->setAvatarSize($size);
        $gravatar->enableSecureImages();

        return $gravatar->buildGravatarURL($this->getUserEmail());
    }
754541
public static function anchor($href, $text = null, $attr = array(), $secure = null)
	{
		if ( ! preg_match('#^(\w+://|javascript:|\#)# i', $href))
		{
			$urlparts = explode('?', $href, 2);
			$href = \Uri::create($urlparts[0], array(), isset($urlparts[1])?$urlparts[1]:array(), $secure);
		}
		elseif ( ! preg_match('#^(javascript:|\#)# i', $href) and is_bool($secure))
		{
			$href = http_build_url($href, array('scheme' => $secure ? 'https' : 'http'));

			// Trim the trailing slash
			$href = rtrim($href, '/');
		}

		// Create and display a URL hyperlink
		is_null($text) and $text = $href;

		$attr['href'] = $href;

		return html_tag('a', $attr, $text);
	}
1017134
public function profile(string $email, ?bool $secure = null): string
    {
        return $this->buildUrl($this->createEmailHash($email), $secure);
    }
469302
public function vcard(string $email, ?bool $secure = null): string
    {
        return $this->profile($email, $secure).'.vcf';
    }
1075656
public function getProfileUrl($email, $format = 'json', array $options = [])
    {
        $url = 'https://www.gravatar.com/';

        $url .= md5(strtolower(trim($email))).'.';
        $url .= in_array($format, ['json', 'xml', 'php', 'vcf', 'qr']) ? $format : 'json';

        if ($options) {
            $url .= '?'.http_build_query($options);
        }

        return $url;
    }
1240930
public static function avatar($email, $size = null)
    {
        $url = sprintf('%s/avatar/%s', self::$gravatarURL, md5($email));
        
        if (!is_null($size)) {
            $url .= '?s=' . $size;
        }
        
        return $url;
    }
805793
public function getUserByEmail($email, $baseDn = null, $scope = Ldap::SEARCH_SCOPE_SUB, $attributes = [])
    {
        return $this->search(
            sprintf('(&(objectClass=user)(mail=%s))', AbstractFilter::escapeValue($email)),
            $baseDn,
            $scope,
            $attributes
        );
    }
1048846
public function getProfileUrl($email, $secure = true)
    {
        $hash = md5(strtolower(trim($email)));

        return $this->getProfileUrlForHash($hash, $secure);
    }
748340
public static function get_gravatar($email, $size = 32)
    {
        if (self::is_https()) {
            $url = 'https://secure.gravatar.com/';
        } else {
            $url = 'http://www.gravatar.com/';
        }

        $url .= 'avatar/' . md5($email) . '?s=' . (int) abs($size);

        return $url;
    }
564627
function gravatarURL(email) {
  var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 32;
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOptions;

  var url = 'https://secure.gravatar.com/avatar/';

  if (isHash(email)) {
    url += email;
  } else {
    url += (0, _md2.default)(email.toLowerCase());
  }

  var qs = _queryString2.default.stringify(_extends({ s: size }, options));
  if (qs) {
    url += '?' + qs;
  }

  return url;
}
33333
public static function profile($email)
    {
        $url = sprintf('%s/%s.json', self::$gravatarURL, md5($email));
        
        $client = new Client();
        
        return json_decode($client->get($url)->getBody()->getContents());
    }
993820
public function script($url, $attributes = [], $secure = null)
    {
        $attributes['src'] = $this->url->asset($url, $secure);
        return '<script' . $this->attributes($attributes) . '></script>' . PHP_EOL;
    }