diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-23 12:52:15 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-23 12:52:15 +0400 |
commit | 3295a4db9dc417f368720f7fe9724ec8bee0ddcd (patch) | |
tree | ac96ae50c4171bc121b44971920b43b7f0601e39 /app/helpers | |
parent | 972e40cc47b267503059ab1ebb55264596de9271 (diff) | |
parent | ca19260812c60ece623265afa23429f8f1bdbedb (diff) |
Merge branch 'email_in_gravatar_urls' into 'master'
allow passing user's email address in custom Gravatar urls
Some custom avatar systems use the user's email address rather than its hash. This merge request will allow the administrator to configure gitlab-ce to use the user's email address gravatar.plain_url and gravatar.ssl_url in the config file like this:
```
gravatar:
enabled: true
plain_url: "http://company.com/avatar/?mail=%{email}&size=%{size}"
ssl_url: "https://company.com/avatar/?mail=%{email}&size=%{size}"
```
It's a only a 2 word patch.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index faecde299c1..5f07cdf448c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 |