On Tuesday, May 23, 2017 at 11:39:17 AM UTC-4, [email protected] wrote:
>
> this feels like checkmate.
>
Why? Just write a function that accepts a form as an argument (you don't
have to actually do anything with the form in the function) and does the
inserts, and use that as the register_onaccept callback. For example:
def do_database_inserts(form):
[some code]
auth.settings.register_onaccept.append(do_database_inserts)
The do_database_inserts function will now be called upon each successful
registration. If you need the user id of the new user, it will be in
form.vars.id.
Anthony
--
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.