after Lost Password onaccept

28 views
Skip to first unread message

lucas

unread,
Mar 22, 2023, 8:18:28 PM3/22/23
to web2py-users
hello one and all,

ok, you know when you assign a function to the auth.settings.login_onaccept event under db.py?  well i have a lot of group authorizations happening under that function which sets up the rest of the application responding to those authorizations accordingly.  i also set the auth.settings.register_onaccept to that same function, undoubtedly to setup similar authorizations after a person first successfully registers into the website.

so what is the event name to assign the same function after a person does "Lost Password", clicks on the link in the sent email, and then types and retypes in the new password?  because after accepting both passwords, the system automatically logs the person in but does not run the auth.settings.login_onaccept event and corresponding function.  i thought it might be auth.settings.verify_email_onaccept but it is not that one.

thank you in advance, lucas

Leonel Câmara

unread,
Mar 23, 2023, 8:00:11 AM3/23/23
to web2py-users
It's auth.settings.reset_password_onaccept

However you can also simply use auth.settings.login_after_password_change = False to force the user to login again.

lucas

unread,
Mar 23, 2023, 8:13:21 AM3/23/23
to web2py-users
thank you, that worked great.  both suggestions.  lucas
Reply all
Reply to author
Forward
0 new messages