I have an app that has users for multiple companies registering
and then are later approved by an administrator for that
particular company.  The problem is that I need to insert a value
into the users record (in this case a company name) so that the admin
for that company can then approve that user.

I can't find a way to get the users id before they are approved.
I'm using the following settings:

auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = True

def set_company_name(form):
        ...

I've tried both of the following:
auth.settings.register_onaccept = set_company_name
auth.settings.register_next = URL(r=request, f='set_company_name')

session.auth and auth.user_id both return None in each case. If
I set registration_requires_approval = False the I can get the user
id.

Am I missing something or should I rethink registration for this app?

Reply via email to