I used pylons in my web app,I set a attrubute in session for check login.
when I do logout action,the value is still exist.

this is my code:
def login(self):
        username=request.params['userName']
        password=request.params['password']
        rowset=meta.Session.query(wh_users.WHUsers)\
               .filter(wh_users.WHUsers.wh_username==username)\
               .filter(wh_users.WHUsers.wh_password==password)\
               .filter(wh_users.WHUsers.del_flg=='1')
        if rowset.count() > 0 :
              session['USER_KEY']=rowset[0]
              session.save()
def logout(self):
        if session.__contains__("USER_KEY") :
                session.__delitem__('USER_KEY')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to