session.auth.expiration = auth.settings.long_expiration
session.auth.remember = True--
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/HdoErSDw-z8/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
def ajax_login():
email = request.vars.email
password = request.vars.password
remember_me = request.vars.remember_me
user = auth.login_bare(email, password)
if user:
if remember_me:response.cookies[response.session_id_name]["expires"] = session.auth.expirationdef _login():
email = request.post_vars.email
password = request.post_vars.password
remember = request.post_vars.remember
user = auth.login_bare(email, password) if not user: return response.json({'success':False})
else:
if remember:
session.auth.expiration = 3600 * 24 * 30 # one month session.auth.remember = True response.cookies[response.session_id_name]["expires"] = session.auth.expiration return response.json({'success':True})--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/HdoErSDw-z8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.