Using PHP database sessions and needing to regenerate session id issue
Hi. I am utilising PHP sessions with a database rather than the traditional file storage. I currently am running into an issue with session regeneration. For the sign in, we regenerate the session id...
View ArticleUsing PHP database sessions and needing to regenerate session id issue
public function verify_credentials($username, $password): bool { $sql = "SELECT id, password FROM " . $this->table . " WHERE username =:username LIMIT 1"; $user =...
View ArticleUsing PHP database sessions and needing to regenerate session id issue
won’t work at all This is not the most useful sort of error message. Having said that I don’t understand the point of your update in your login code regardless of if the session is regenerated or not....
View ArticleUsing PHP database sessions and needing to regenerate session id issue
Hey, Please could you elaborate on what you mean? I like to follow best practices and right now my solution doesn’t follow them. Would be amazing if you could provide me with a solution showcasing the...
View ArticleUsing PHP database sessions and needing to regenerate session id issue
The simple way of doing this is to only store the user’s id in a session variable in the login code, then query on each page request to get any other user data, such as the username, permissions,...
View ArticleUsing PHP database sessions and needing to regenerate session id issue
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed. Read full topic
View Article