Why are you passing session=None to .process ?
http://zerp.ly/rochacbruno
Em 12/03/2012 09:43, "Sushant Taneja" <[email protected]> escreveu:
> Hi,
>
> Following is the snippet from my db.py global file:
>
> db = DAL('google:datastore')
>
> from gluon.tools import Auth
> auth = Auth(db, hmac_key=Auth.get_or_create_key())
>
> auth.settings.login_url = URL('default','index')
> auth.settings.logged_url = URL('user','profile')
> auth.settings.login_next = URL('user','profile')
>
> auth.define_tables()
>
>
> In my controller default/index controller I have used the following:
>
> def index():
>
> login_form = auth.login()
> if login_form.process(session=None,formname='login').accepted:
> pass
> elif login_form.errors:
> response.write(request.vars)
> return dict()
>
> to display the form I have used the SQLForm in HTML technique as mentioned
> in the web2py book
>
> Whenever user enters the correct email and password. auth_event registers
> a login event with the description *User 1 Logged In*.
> The next property redirects the URL to /user/profile but auth.user object
> is *None.*
> *
> *
> Is there some auth setting that I am missing or something else is the
> reason of this ?
>
> Thanks,
> Sushant
>
>
>