On Tue, 22 Mar 2005 17:58:41 +0200 (IST), Gabor Szabo <[EMAIL PROTECTED]> wrote:
> On Tue, 22 Mar 2005, Cees Hek wrote:
> >
> >> 2) Give out cookies only when someone has logged in. (or registered ?)
> >
> > This should be quite easy.  Just make sure you do not call
> > $self->session unless you really need to...  If you always need to
> > call $self->session to figure out if someone is logged in, then I
> > would suggest you handle the cookies manually by setting SEND_COOKIE
> > to 0 and calling $self->session_cookie manually when you know you have
> > a valid session.  You could do this in the same location as you do
> > your authentication.
> >
> 
> Thanks for the quick reply.
> 
> I did this and it does not set the cookie any more but still
> creates the entry in the database :(

Of course...  I got it backwards...  You don't care about the cookie
going out, you just don't want the database entries.  So just call
$self->session->delete when you realize that this is an unecesary
session.  The only possible problem with this, is that I don't know
what will happen if you call $self->session afterwards...  It may
cause you some problems...

-- 
Cees Hek

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to