Any of these will work:

db.auth_user[id] = dict(first_name=first_name)
db.auth_user[id].update_record(first_name=first_name)
db(db.auth_user.id==id).update(first_name=first_name)

the problem is (I believe) that auth caches the current logged in user
in session.auth.user==auth.user so you also need:

auth.user.first_name=first_name




On Nov 27, 3:35 pm, Constantine Vasil <thst...@gmail.com> wrote:
> I want to change auth_user first_name and last name
> progrmmaically having the user id:
>
> I tried this:
>         db.auth_user[id] = dict(first_name=first_name)
>         db.auth_user[id] = dict(last_name=last_name)
>
> but when reaching this statement in my db.py file I don't see
> auth updated:
>
>     db = DAL('google:datastore')
>     auth = Auth(db, hmac_key=Auth.get_or_create_key())
>
> How is the right way to do that?

Reply via email to