Hello,

I've got my own user system (not using Auth), and I'm trying to
implement a Remember Me option with cookies. It's working fine when
the user selects 'Yes' for remember me. Setting and detecting the
cookie is no problem, but I can't find a way to delete the cookie when
the user logs out or selects 'No'. Here's my code which attempts
everything I can think of.

if request.cookies.has_key('user'):
        request.cookies['user'].clear()
        del request.cookies['user']
        print 'remove request user cookie'
if response.cookies.has_key('user'):
        response.cookies['user'].clear()
        del response.cookies['user']
        print 'remove response user cookie'

After running this, request.cookies.has_key('user') is still returning
true and the cookie's data is still present.

Ideas? Thanks.

Reply via email to