On Tuesday, May 2, 2017 at 7:27:21 AM UTC-4, Annet wrote: > > Thank you both for your replies. > > In the default/user function I have form=auth() which calls accepts by > itself. > > Your reference to the book was helpful, I think something like: > > auth.settings.profile_onaccept = lambda form: __on_profile() > > def __on_profile() > row = db.table_name(ID=form.ID) > if row: > record.update_record(email=form.email) >
Note, there is no need to wrap a function in a lambda if the function itself already has the proper signature. Also, you should define your function to accept a "form" argument. Also, even though auth() calls .accept() on its own, you can still do something like: form = auth() if form.accepted: ... Anyway, in this case, using the onaccept callback is probably the way to go. 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.