def user_portrait(user = current_user)
      email_method = security.email_method || :email
      email = ModuleUtils.try_to user, email_method
      if email.present?
        https = "http#{request.ssl? ? 's' : EMPTY_STRING}"
        email_md5 = ::Digest::MD5.hexdigest email.downcase
        image_source = "#{https}://www.gravatar.com/avatar/#{email_md5}"
        image_tag image_source, class: 'user'
      else
        fa_icon 'user'
      end
    end
def user_portrait(user = current_user)
      email_method = security.email_method || :email
      email = ModuleUtils.try_to user, email_method
      if email.present?
        https = "http#{request.ssl? ? 's' : EMPTY_STRING}"
        email_md5 = ::Digest::MD5.hexdigest email.downcase
        image_source = "#{https}://www.gravatar.com/avatar/#{email_md5}"
        image_tag image_source, class: 'user'
      else
        fa_icon 'user'
      end
    end
Image portrait for given user.
 - if email is present, a gravatar image tag will be returned
 - otherwise, an user icon will be returned
 @param user [Object]
 @return [String] IMG or I element