Hello everyone, My situation. I would like to approve every user that signs up with my site. I understand that I should set the following to True (in db.py):
auth.settings.registration_requires_approval = True After I approve the user, I would like to insert a value into the database. I tried the following (in default.py): auth.settings.register_onaccept.append(lambda form: __add_company(form)) > def __add_company(form): > print 'user.id', auth.user_id > dbs.company.insert(name = form.vars.Company, created_by = auth.user_id) However, this inserts the value when the user signs up and before I can verify. Also, the auth.user_id is None because the user is not signed in. Is there another way to do this? Is there a function that runs after an update to the auth.user_id. -- 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.