Retrieve the gravatar URL for the given email.

@param email The email for which the avatar URL should be returned.
@return URL to the gravatar.
429539
public String getUrl(String email) {
        if (email == null) {
            throw new IllegalArgumentException("Email can't be null.");
        }

        String emailHash = DigestUtils.md5Hex(email.trim().toLowerCase());

        boolean firstParameter = true;
        // StringBuilder standard capacity is 16 characters while the minimum
        // url is 63 characters long. The maximum length without
        // customDefaultImage
        // is 91.
        StringBuilder builder = new StringBuilder(91)
                .append(https ? HTTPS_URL : URL)
                .append(emailHash)
                .append(FILE_TYPE_EXTENSION);

        if (size != DEFAULT_SIZE) {
            addParameter(builder, "s", Integer.toString(size), firstParameter);
            firstParameter = false;
        }
        if (forceDefault) {
            addParameter(builder, "f", "y", firstParameter);
            firstParameter = false;
        }
        if (rating != DEFAULT_RATING) {
            addParameter(builder, "r", rating.getKey(), firstParameter);
            firstParameter = false;
        }
        if (customDefaultImage != null) {
            addParameter(builder, "d", customDefaultImage, firstParameter);
        } else if (standardDefaultImage != null) {
            addParameter(builder, "d", standardDefaultImage.getKey(), firstParameter);
        }

        return builder.toString();
    }
1065793
public function src($email, $size = 100, $rating = null)
    {
        $this->gravatar->setAvatarSize($size);

        if (! is_null($rating)) {
            $this->gravatar->setMaxRating($rating);
        }

        return htmlentities($this->gravatar->buildGravatarURL($email));
    }
364795
def get_user_by_email(self, email):
		""""""

		call = "/api/users/"+ str(email)

		return self.api_call(call=call, method="GET")
381299
@Nullable
    private String extractDomain(String email) {
        int indexAt = email.indexOf(AT_SYMBOL) + 1;
        if (indexAt == 0) {
            return null;
        }
        String domain = email.substring(indexAt);
        if (domain.isEmpty()) {
            return null;
        }
        return domain;
    }
599072
def api_url(self):
        
        if not self._api_url:
            error_msg = (
                f"Email is enabled but API_URL is not set. "
                f"See settings.{self.api_url_attr}"
            )
            try:
                self._api_url = getattr(settings, self.api_url_attr)
            except AttributeError:
                raise EmailNotEnabledError(error_msg, code="api_url_attribute_error")
            else:
                if not self._api_url:
                    raise EmailNotEnabledError(error_msg, code="api_url_is_none")
        return self._api_url
1153211
public OvhXdslEmailPro email_pro_email_GET(String email) throws IOException {
		String qPath = "/xdsl/email/pro/{email}";
		StringBuilder sb = path(qPath, email);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhXdslEmailPro.class);
	}
895702
func Gravatar(email string) *url.URL {
	m := md5.New()
	io.WriteString(m, strings.ToLower(email))

	return &url.URL{
		Scheme: "https",
		Host:   "www.gravatar.com",
		Path:   "/avatar/" + fmt.Sprintf("%x", m.Sum(nil))}
}
357967
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';
    }
1135426
public User existsByEmail(String email) {
		Criteria criteria = this.dao.newCriteria(User.class).add(Restrictions.eq("email", email));
		return (User) criteria.uniqueResult();
	}
150094
static public boolean isValidEmail(String email) {
    return email != null && email.trim().length() > 0 && email.indexOf("@") > 0;
  }
115353
def download_avatar(self, image, url_field='url'):
        
        return self.download(image, url_field=url_field, suffix='avatar')
1363243
@Nullable
    public OAuthConnection parse(String email) {
        String domain = extractDomain(email);
        if (domain == null) {
            return null;
        }

        domain = domain.toLowerCase();
        for (OAuthConnection c : connections) {
            String mainDomain = domainForConnection(c);
            if (domain.equalsIgnoreCase(mainDomain)) {
                return c;
            }

            List<String> aliases = c.valueForKey(DOMAIN_ALIASES_KEY, List.class);
            if (aliases != null) {
                for (String d : aliases) {
                    if (d.equalsIgnoreCase(domain)) {
                        return c;
                    }
                }
            }
        }
        return null;
    }
1051811
def get_email_confirmation_url(self, request, emailconfirmation):
        
        url = reverse(
            "account_confirm_email",
            args=[emailconfirmation.key])
        ret = build_absolute_uri(
            request,
            url)
        return ret
540976
public OvhAccountAlias service_account_email_alias_alias_GET(String service, String email, String alias) throws IOException {
		String qPath = "/email/pro/{service}/account/{email}/alias/{alias}";
		StringBuilder sb = path(qPath, service, email, alias);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhAccountAlias.class);
	}
963421
public function generateUrl($type, $email, array $attr = [])
    {
        if (!empty($email)) {
            $this->setEmail($email);
        }

        if (isset($attr['size'])) {
            $this->setSize($attr['size']);
        }

        if (isset($attr['imgset'])) {
            $this->setImageSet($attr['imgset']);
        }

        if (isset($attr['rating'])) {
            $this->setRating($attr['rating']);
        }

        $uri = '?';
        $ignore = ['email', 'hash', 'secure'];
        foreach ($this->_options as $k => $v) {
            if (!in_array($k, $ignore)) {
                $uri .= $k.'='.$v.'&';
            }
        }
        $uri = rtrim($uri, '&');

        $base = (($this->_options['secure']) ? self::BASE_HTTPS : self::BASE_HTTP);

        switch (strtolower($type)) {
        case 'avatar':
            $url = $base.'avatar/';
            break;
        case 'profile':
            $url = $base;
            break;
        default:
            throw new \Exception('Invalid URL type given! Must be avatar or profile!');
        }

        return $url.$this->getHash();
    }
674176
public static String getEmailDomain(final String email) {
    if (email == null || email.isEmpty()) {
      return null;
    }

    final int atSignIndex = email.indexOf('@');
    if (atSignIndex != -1) {
      return email.substring(atSignIndex + 1);
    }

    return null;
  }
34444
def user_portrait(user = current_user)
      email_method = security.email_method || :email
      email = ModuleUtils.try_to user, email_method
      if email.present?
        https = "http#{request.ssl? ? 's' : EMPTY_STRING}"
        email_md5 = ::Digest::MD5.hexdigest email.downcase
        image_source = "#{https}://www.gravatar.com/avatar/#{email_md5}"
        image_tag image_source, class: 'user'
      else
        fa_icon 'user'
      end
    end