I actually had that code originally, but if I edit the flag using the
appadmin, I get strings, so I added the 2nd check.

Also, Massimo, that did the trick!
I had:
db(db.auth_user.id==me).update(eula_accepted=True)

Thanks,
Charles


On May 3, 9:42 am, Massimo Di Pierro <[email protected]>
wrote:
> You may have an old web2py version. The auth.user should be re-read
> after editing profile. If the eula is not in profile than you have to
> set it manually in the action that handles he eula
>
> auth.user.eula_accepted=True
>
> On May 2, 11:10 pm, Charles Law <[email protected]> wrote:
>
>
>
>
>
>
>
> > I'm trying to add an EULA that users have to agree to on first login.
> > I'm doing this right now by adding a field to the auth.user called the
> > eula_accepted flag.  If that flag isn't set, it will load a EULA form,
> > otherwise, it loads the default webpage.
>
> > When the user accepts the agreement, the form gets submitted which
> > sets the flag.  I can verify using the appadmin that the field gets
> > set.  But what seems to happen after accepting the form is that the
> > flag is not reread even when I refresh the page.  Is there any command
> > I can run to reread the flag?  The only thing I've gotten to work so
> > far is to login again.  Any ideas?
>
> > Here is the (messy) if statement in the html view.
> > {{if auth.user and (auth.user.eula_accepted==False or
> > auth.user.eula_accepted=="False"):}}
> > Thanks!

Reply via email to