1. Marcin Kuzminski
  2. RhodeCode
  3. Issues


Issue #531 resolved

gravatar not displayed if mail not part of author

created an issue

rhodecode/templates/changeset/changeset.html uses rhodecode/lib/vcs/utils/init.py->author_email to get the email of the author

This function does not consult the DB for the email of the author but only looks if the author text contains an email. I think the author_email function should try to find an email in the DB.

Comments (12)

  1. Marcin Kuzminski repo owner

    ahh sory I'm wrong person returns username in case we match in DB, it should be email_or_none which try to match email if no email try to match username in rhodecode DB, and get email from this user

  2. domruf reporter

    sorry for reopening this but there are more files with the same problem

    rhodecode\templates\admin\notifications\notifications_data.html rhodecode\templates\admin\notifications\show_notification.html rhodecode\templates\changelog\changelog.html rhodecode\templates\changeset\changeset_range.html rhodecode\templates\compare\compare_cs.html rhodecode\templates\files\files_source.html rhodecode\templates\search\search_commit.html

  3. domruf reporter

    sorry still one missing :-) rhodecode\templates\files\files_source.html I fixed it like this

    @@ -14,7 +14,7 @@
                     <div class="item">${h.literal(ungettext(u'%s author',u'%s authors',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }</div>
                     %for email, user in c.authors:
                       <div class="contributor tooltip" style="float:left" title="${h.tooltip(user)}">
    -                    <div class="gravatar" style="margin:1px"><img alt="gravatar" src="${h.gravatar_url(email, 20)}"/> </div>
    +                    <div class="gravatar" style="margin:1px"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(user), 20)}"/> </div>
  4. Marcin Kuzminski repo owner

    We have completly change the mapping in RC 3.5, now there's a concept of user profiles that we have. Also checked all the code that was doing the mapping. It's now very consistent, and this issue should be fixed.

  5. Log in to comment