Jump to content

Recommended Posts

Whats the best way to remember if a user is logged in

 

I use sessions at the moment, but Ive had to set the session.cookie_lifetime to an obscene number to prevent the cookie from being deleted upon browser close

 

I want to do it the proper way

 

What is the standard?

Link to comment
https://forums.phpfreaks.com/topic/86368-solved-remember-a-login/
Share on other sites

Session cookie isn't the same as a Cookie.  As soon as you close the browser, the browser will pick up a new session if they come back.  I am not sure what you gain by not clearing it except allowing people more time to try and hack the session id.

 

Use a Cookie if you want to log them in upon return.

 

Whats the best way to remember if a user is logged in

 

I use sessions at the moment, but Ive had to set the session.cookie_lifetime to an obscene number to prevent the cookie from being deleted upon browser close

 

I want to do it the proper way

 

What is the standard?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.