Commit 12bb1d8f authored by Valeriy Sizov's avatar Valeriy Sizov

Merge pull request #775 from netdata/gravatar_empty_issue

When the email address is empty gitlab will give a 500 error
parents 28bc6c52 babb6a1a
require 'digest/md5'
module ApplicationHelper
def gravatar_icon(user_email, size = 40)
def gravatar_icon(user_email = '', size = 40)
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
user_email.strip!
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment