Jump to content

[SOLVED] OOPHP user authentication


robcrozier

Recommended Posts

Hi.  I wonder if anyone can advise me on this....

 

Basically, i've got a 'User' class which contains all the relevant methods to log a user in, validate their login status etc....  However, i'm having a few issues with some people (on different machines) being logged out after only 5mins even though the session settings are set to stay alive for 20 mins. 

 

What i want to do is create a login script that does not rely solely on sessions, but also a users last activity in the database.  My current user class uses a 'username' session to collect all data about a user however and if this is not present, the user data cannot be collected and thus the user cannot remain logged in!?

 

Can anyone suggest how i would go about this?

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/147896-solved-oophp-user-authentication/
Share on other sites

Are you on a shared web server and is the session.save_path setting using the default shared folder?

 

If so, one of the other scripts running on the server has probably set a shorter session.gc_maxlifetime. The solution is to set the session.save_path to be to a private folder within your account's folder tree so that your session.gc_maxlifetime setting only affects your session data files.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.