Loosing login session on search

Website issues & feedback. Constructive criticism is welcome.
(Guest posting is allowed under certain circumstances)
If you have a problem with certain individuals, then PM the Staff account.

Loosing login session on search

Postby nick87720z » 23 Nov 2017, 13:35

After login i can only navigate forum directly without loosing session.
If i try to search for interesting topic (since i don't remember, where it is), search page is showed 'Login' word instead of my nick (like i'm unloged), and following links from search results, i enter necessary topic with unloged state.
Returning to previous page by pressing browser's back button to page before search attempt, i get back into same session.

Same happens if i simply choose topic url from browser history after login.
nick87720z
Trained
Trained
 
Posts: 48
Joined: 25 Feb 2014, 16:37

Re: Loosing login session on search

Postby Bethrezen » 24 Dec 2017, 19:36

you aren't the only one there seems to be something a bit weird about how this whole thing is set up, and I'm forever being auto logged out, not sure what is going on but if i had to hazard a guess i would assume that who ever set up the login system for this did so incorrectly, and the session token is not being retained like it should be.

The following should only happen when you click the log out button, or when the specified time out period has been reached.

Code: Select all
<?php
// remove all session variables
session_unset();

// destroy the session
session_destroy();
?>


in any event here is a bit of info on sessions and how to set them up properly.

https://www.w3schools.com/php/php_sessions.asp

what is probably happening is that who ever set this up forgot to carry over a variable or forget to wrap the end session code in a conditional statement so that it wont fire till the user clicks the logout button or the session expiry time is reached.
Bethrezen
Trained
Trained
 
Posts: 473
Joined: 25 Sep 2009, 02:05


Return to Website feedback