Add email parameter in the gravatar urls
Created by: ArnY
We use a custom avatar system that requires to pass the email address rather than the hash. So it could be usefull (and rather cheap in term of code change) to add the possibility to use %{email} in plain_url and ssl_url in gitlab.yml.
Here is the rather simple diff to implement this:
--- ./app/helpers/application_helper.rb~ 2013-12-17 12:03:40.000000000 +0100
+++ ./app/helpers/application_helper.rb 2013-12-17 17:29:11.150912233 +0100
@@ -66,7 +66,7 @@
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