##// END OF EJS Templates
fixes issue #531, when extracting user email, we check it against the database,...
marcink -
r2725:3853e37d beta
parent child Browse files
Show More
@@ -396,8 +396,14 b' def is_hg(repository):'
396
396
397
397
398 def email_or_none(author):
398 def email_or_none(author):
399 # extract email from the commit string
399 _email = email(author)
400 _email = email(author)
400 if _email != '':
401 if _email != '':
402 # check it against RhodeCode database, and use the MAIN email for this
403 # user
404 user = User.get_by_email(_email, case_insensitive=True, cache=True)
405 if user is not None:
406 return user.email
401 return _email
407 return _email
402
408
403 # See if it contains a username we can get an email from
409 # See if it contains a username we can get an email from
@@ -53,7 +53,7 b''
53 <div class="left">
53 <div class="left">
54 <div class="author">
54 <div class="author">
55 <div class="gravatar">
55 <div class="gravatar">
56 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
56 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(c.changeset.author),20)}"/>
57 </div>
57 </div>
58 <span>${h.person(c.changeset.author)}</span><br/>
58 <span>${h.person(c.changeset.author)}</span><br/>
59 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
59 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
General Comments 0
You need to be logged in to leave comments. Login now