The questions say so much, all. I'm looking at the web2py book where it says about the session. But I can learn how to use sessions only from the Aastha Table. I am trying to create a session from the default ATH table to an email ID where I can register and login.
Any help regarding this is greatly appreciated.
If the user is logged in, then db.auth_user
record Auth.user is available in
(assuming you have designated your Auth
object "auth"). Therefore, in the layout view, you may have something like this:
{{auth.user:}} {{= auth.user.email}} {{close}}
Note, the auth.user
record is also stored in the session (hence there is no need to recover from the database on each request). Therefore, auth.user == session.auth.user
.
Comments
Post a Comment