Support » Plugins » WP Session Manager Plugin – Issue with session variables not being set

  • Resolved azibux1

    (@azibux1)


    Hi,

    I have an issue with the above plugin (WP Session Manager) where the session variables I set, are not always set. I know the PHP I’m using to set the variables is correct as they do work sometimes. But for example, I can have them working perfectly fine and echo’ed out to the screen as a test, then I ‘logout’ and blank all the variables by setting them to “”, then log back in (and set them again) but they do not get echo’ed out this time, meaning they must not be set.

    I know one works for definite, as it is used to see if the user is logged in or not, and I only get asked to log in on my site once, I can navigate around pages etc, close the browser and I’m only asked to log back in when I use my logout button to blank the variables.

    Does anyone know what might be causing this please? Or is it going to be something very hard to diagnose?

    Don’t know if it will help or not (to fix the issue), with regards to editing the session timeout time, I see that there is the info on the FAQ page of the plugin, saying that it can be edited using this filter

    add_filter( 'wp_session_expiration', function() { return 60 * 60; } );

    But where is this filter found/edited or added?

    Hope someone can help with the problem 🙂

    Thanks!

Viewing 1 replies (of 1 total)
  • I have fixed this now. Redirecting to a different page instantly was causing an issue, waiting for 1 second before doing the redirect allowed the variables to be set.

Viewing 1 replies (of 1 total)
  • The topic ‘WP Session Manager Plugin – Issue with session variables not being set’ is closed to new replies.