*Using the scaffolding app (2.9.12), here is the db.py of TEST app:*
# For the LOCAL / Development Site:
db = DAL('mysql://root:sqlpwd@localhost/TestDB', fake_migrate_all=True)
from gluon.tools import Auth
auth = Auth(db)
auth.define_tables(username=False,signature=False)
auth.settings.create_user_groups = None
auth.settings.remember_me_form = True
auth.settings.registration_requires_verification = True
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True
auth.messages.verify_email = 'Click on the link http://' +
request.env.http_host +
URL(r=request,c='default',f='user',args=['verify_email']) + '/%(key)s
to verify your email and complete the registration to TEST site'
auth.messages.reset_password = 'Click on the link http://' +
request.env.http_host +
URL(r=request,c='default',f='user',args=['reset_password']) + '/%(key)s
to reset your password on TEST site'
# Configure MAIL registration with GMAIL
from gluon.tools import Mail
mail=auth.settings.mailer
mail.settings.server = 'smtp.gmail.com:587'
mail.settings.sender = '[email protected]'
mail.settings.login = '[email protected]:gmailpwd'
*ISSUES (?):*
*1. While the registration using gmail works fine, and the password reset
sends an email as expected, when user clicks on the link in the email - W2P
flashes "Invalid reset password".*
*The only solution I found working / bypassing this bug (?) is to eliminate
the line:*
auth.messages.reset_password = 'Click on the link http://' +
request.env.http_host +
URL(r=request,c='default',f='user',args=['reset_password']) + '/%(key)s
to reset your password on TEST site'
*Then W2P still sends an email with a generic instruction to click ...to
"reset your password" (without my words "on TEST site") - and that one
WORKS !*
*2. Playing with the various options in db.py trying to figue the first
issue, I have noticed another strange behavior. **If I modify the line:*
auth.settings.reset_password_requires_verification = True
*to *
auth.settings.reset_password_requires_verification = False
*W2P still sends an email when a password reset is required, even though it
was NOT supposed to (unless I have misunderstood this command...)*
*Is the above behavior a bug or I am doing something incorrectly ?*
*Thanks*
*NeoToren*
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.