robcrozier Posted March 1, 2009 Share Posted March 1, 2009 Hi guys. I'm new'is to OO PHP and i would like to seek some helpful opinions about how to use OOPHP when creating a secure user authentication/login class. My main question is.... i would rather not rely solely on a session variable to keep the user logged in to the site. Is it best practice, and how secure is it to use a 'last activity' value in a database related to each user and use this to determine how long a user has been inactive and then log them out if this is linger than whichever time period i specify in a config file or something similar? Hope this makes sense! Cheers Link to comment https://forums.phpfreaks.com/topic/147475-oophp-help-user-authentication/ Share on other sites More sharing options...
jackpf Posted March 1, 2009 Share Posted March 1, 2009 Well, your only other option is cookies, which I personally prefer since they can last forever. But tbh, if you take the right precautions, both methods are as secure as anything. Link to comment https://forums.phpfreaks.com/topic/147475-oophp-help-user-authentication/#findComment-774098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.