After processing the form, try:

auth.user.update(form.vars)

auth.user is just a (dictionary-like) Storage object, so you can update it 
like any dictionary. Note, if form.vars includes some variables that are 
not part of the auth_user table (and therefore shouldn't be added to 
auth.user), you can do:

auth.user.update(db.auth_user._filter_fields(form.vars)) 

The _filter_fields method returns a filtered copy of form.vars including 
only fields in the auth_user table.

Another alternative might be to just use the auth.profile() action (it 
automatically handles updating auth.user). If you want to limit the fields 
that can be edited via profile(), you can simply set their .writeable 
attribute to False before calling auth.profile().

Anthony

On Wednesday, January 11, 2012 8:14:17 AM UTC-5, Magrelo wrote:
>
> Hello all, 
>
> Ive created a custom form to change some auth.user informations. 
> After I submit this form how can I update auth.user? 
>
> For example, on the form I changed the first_name, submited and it 
> change de db, but the user session keeps the old first_name value. I 
> have to logout and login to see the changes. 
>
> Thanks for any help. 
>
>
> Thiago

Reply via email to