Re: [web2py] Re: log out user

2013-01-29 Thread Alan Etkin
> > Not to mention is_new() and is_expired()... > They are self-explanatory, but one has to search the api docs or this group or dir(session) to find them. clear seems to be inherited from dict, but there's no guarantee of what it does as it could overridden by the Session class, etc, etc, et

Re: [web2py] Re: log out user

2013-01-29 Thread Jonathan Lundell
On 29 Jan 2013, at 12:28 PM, Alan Etkin wrote: > It may be if you want to always clean everything in the session (auth info > etc.) > > I belive session.clear() is not documented in the book. Would it be possible > to add a general description of what it does and how to use it? Not to mention

[web2py] Re: log out user

2013-01-29 Thread Alan Etkin
> > It may be if you want to always clean everything in the session (auth info > etc.) > I belive session.clear() is not documented in the book. Would it be possible to add a general description of what it does and how to use it? Thanks -- --- You received this message because you are subs

[web2py] Re: log out user

2012-09-24 Thread Massimo Di Pierro
It may be if you want to always clean everything in the session (auth info etc.) On Monday, 24 September 2012 03:04:24 UTC-5, Yebach wrote: > > If I put session.clear() into the controler of the default page it works > > Is that I good solution? It is true that a user has to log in again but it

[web2py] Re: log out user

2012-09-24 Thread Yebach
If I put session.clear() into the controler of the default page it works Is that I good solution? It is true that a user has to log in again but it kind of works On Monday, September 24, 2012 8:48:03 AM UTC+2, Yebach wrote: > > Where do I insert the code? In model? > > this is now my code in db.

[web2py] Re: log out user

2012-09-23 Thread Yebach
Where do I insert the code? In model? this is now my code in db.py if session['school_db'] != request.cookies['mycookie'].value: auth.logout() session['school_db'] = request.cookies['mycookie'].value But I get an error 'NoneType' object has no attribute 'insert' seems like smth

[web2py] Re: log out user

2012-09-21 Thread Massimo Di Pierro
After login your user info is loaded into session. You need to add something like if session.dbname != current_db_name: auth.logout() session.dbname = current_db_name On Friday, 21 September 2012 07:47:08 UTC-5, Yebach wrote: > > Hello > > You can see my app on portal.iurnik.si