My answer did not get posted. Trying again... auth.settings.register_onvalidation = do_my_postvalidation_stuff auth.messages.registration_successful = 'Thank you for registering' form = auth.register() #does its own call to form.process()
OR form = SQLFORM(db.auth_user) if form.process(onvalidation=do_my_postvalidation_stuff).accepted: session.flash = 'Thank you for registering' On Nov 25, 12:22 am, Dave <dave.st...@gmail.com> wrote: > I'm a bit stumped on this one... > > I need to do some 'stuff' after either a user registeres or updates > their profile. Basically there's a half dozen boolean fields which > correspond to mailing lists the user may "opt-in" to. I tried > customizing the default/user controller like so: > > form = auth.register() > > if form.process(onvalidation=do_my_postvalidation_stuff).accepted: > session.flash = 'Thank you for registering' > > It seems that the form.process OR form.accepts(request,session) does > not work if I let the form be generated by using form = auth() or form > = auth.register(). > > Short of writing my own whole registration and profile management > controllers, is there an easy work around here? When I submit the > form nothing happens. I've even tried putting a debug `print 'got > here'` type message inside the validation method and if construct > above.