On Sep 26, 8:50 pm, Richard <richar...@gmail.com> wrote: > hi Massimo, > > I don't think those examples will work as expected. > > This updates the state of auth but not the database: > auth.user.update(field=value) > > And this updates the database but not the state of auth: > db(db.auth_user.id == auth.user.id).update(field=value) > > Is there a single operation to do both?
no > Also why isn't auth updated with auth.user.update_record() ? no because auth.user is a Storage object (coming from a session) not a record object. > > Richard > > On Sep 27, 7:11 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > I assume you do > > > db(....).update(field=value) > > > similarly you can do > > > auth.user.update(field=value) > > > On Sep 26, 3:44 pm, Tyler Laing <trinio...@gmail.com> wrote: > > > > I ran into an interesting issue in testing my site (http://www.novelite.ca > > > ). If the user buys tokens while logged in, via paypal, paypal then > > > sends a notification to the server via IPN. Processing this adds the > > > tokens to the user's account. My problem is that the auth.user object > > > isn't updated when the user entry is updated in the database. > > > > Is there a way to refresh the user object in Auth safely to account > > > for this update? > >