I currently have a table of tokens
db.define_table('mobile_tokens',
Field ('username', 'reference auth_user'),
Field ('token')
)
After a user resets their password, all the mobile tokens for that user
should also be deleted.
After a user resets their password, is it possible to user
auth.settings.reset_password_onvalidation to get the id of the user (who
just changed their password), in order to delete the mobile_tokens
associated with that user? The user is not yet logged in, so auth.user.id
doesn't work.
So far, I have been resorting to the auth.settings.reset_password_next to
delete the mobile_tokens once the user is on the redirect page. However,
the purpose of the redirect page is just to show confirmation that the
password has changed, not to clear the mobile_tokens on every visit. It
seems more logical to have the mobile_token deletion be attached to the
reset_password function.
--
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/groups/opt_out.