forked from tr4ck3ur/jm2l
Fix link in mail when user with similar name already exists
This commit is contained in:
+3
-2
@@ -653,14 +653,15 @@ def participer(request):
|
|||||||
CheckExist=None
|
CheckExist=None
|
||||||
if CheckExist:
|
if CheckExist:
|
||||||
MyLink = CheckExist.my_hash
|
MyLink = CheckExist.my_hash
|
||||||
|
NewUser = CheckExist
|
||||||
else:
|
else:
|
||||||
DBSession.add(TmpUsr)
|
DBSession.add(TmpUsr)
|
||||||
DBSession.flush()
|
DBSession.flush()
|
||||||
MyLink = TmpUsr.my_hash
|
MyLink = TmpUsr.my_hash
|
||||||
|
NewUser = TmpUsr
|
||||||
|
|
||||||
mailer = request.registry['mailer']
|
|
||||||
# Send the Welcome Mail
|
# Send the Welcome Mail
|
||||||
NewUser = TmpUsr
|
mailer = request.registry['mailer']
|
||||||
# Prepare Plain Text Message :
|
# Prepare Plain Text Message :
|
||||||
Mail_template = Template(filename='jm2l/templates/mail_plain.mako')
|
Mail_template = Template(filename='jm2l/templates/mail_plain.mako')
|
||||||
mail_plain = Mail_template.render(request=request, User=NewUser, action="Welcome")
|
mail_plain = Mail_template.render(request=request, User=NewUser, action="Welcome")
|
||||||
|
|||||||
Reference in New Issue
Block a user