mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 21:56:19 +10:00
allow using the user's email address as a http parameter in gravatar urls for custom avatar systems. For example:
plain_url: "http://avatar.company.com/avatar/?mail=%{email}&size=%{size}" add mention of the different placeholders possible for gravatar urls, mentionning the new %{email}
This commit is contained in:
@@ -75,7 +75,7 @@ module ApplicationHelper
|
||||
else
|
||||
gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
|
||||
user_email.strip!
|
||||
sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size
|
||||
sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size, email: user_email
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ production: &base
|
||||
## Gravatar
|
||||
gravatar:
|
||||
enabled: true # Use user avatar image from Gravatar.com (default: true)
|
||||
# gravatar urls: possible placeholders: %{hash} %{size} %{email}
|
||||
# plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
|
||||
# ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user