Currently I am creating a form with auth.profile()

I have an onvalidation method to perform some extra checks.

form = auth.profile()
if form.process(onvalidation=reauthenticate_user).accepted:

    response.flash = "Changes Saved"
elif form.errors:

    response.flash = "Errors found



This prevented auth.user object from being updated, which auth.profile() 
usually takes care of.

I also tried it with the following:

form = auth.profile()
form.process(onvalidation=reauthenticate_user)



but the default accepts method that usually updates auth.user doesn't work 
either

For now, I've just added the following to the accepted method:
auth.user.update(db.auth_user._filter_fields(form.vars)) 

But I'm interested in knowing if it's possible to specify an onvalidation 
method for auth.profile(), while still using the built-in accepts method.

-- 

--- 
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/groups/opt_out.

Reply via email to