Commit 5d7bdf76426488f3229bb1f97aaa54a676cbf166
1 parent
0f31acd0
Exists in
spb-stable
and in
2 other branches
allow using the user's email address as a http parameter in gravatar urls for cu…
…stom 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}
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -75,7 +75,7 @@ module ApplicationHelper |
75 | 75 | else |
76 | 76 | gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url |
77 | 77 | user_email.strip! |
78 | - sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size | |
78 | + sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size, email: user_email | |
79 | 79 | end |
80 | 80 | end |
81 | 81 | ... | ... |
config/gitlab.yml.example
... | ... | @@ -117,6 +117,7 @@ production: &base |
117 | 117 | ## Gravatar |
118 | 118 | gravatar: |
119 | 119 | enabled: true # Use user avatar image from Gravatar.com (default: true) |
120 | + # gravatar urls: possible placeholders: %{hash} %{size} %{email} | |
120 | 121 | # plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm |
121 | 122 | # ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm |
122 | 123 | ... | ... |