We have this user function, and when a user requests for password retrieval.
I would like to have a flash message displayed once the link is sent to
user email.
So far the mail,successfully sends but how will the user know without the
flash display message?
The code below doesn't seem to work.
def user():
mail = auth.settings.mailer
mail.settings.server = 'smtp.gmail.com:587'
auth.messages.retrieve_username = 'Your user name: %(username)s'
auth.messages.retrieve_username_subject = 'Username retrieval'
auth.messages.reset_password_subject = 'Password Reset: '
mail.settings.sender = '[email protected]'
mail.settings.login = "[email protected]:password"
flash = dict(request_reset_password='Reset password email sent')
auth.messages.email_sent = flash.get(request.args(0),
auth.messages.email_sent)
return dict(form=auth())
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/1145f937-2c73-4ca7-b798-a2589b562ff3n%40googlegroups.com.