prestoav Posted May 2, 2022 Share Posted May 2, 2022 Hi all, PW 3.0.184 On trying to diagnose a form issue it's become clear that the PW $session array is empty. $_SESSION has data in it but PW's own $session variable is empty, not even the User ID is there? For example adding this at the top of any page: <?php print_r($session); ?> Results in this: ProcessWire\Session Object () But this: <?php print_r($_SESSION); ?> Outputs user and other data. I'm trying to use some data that woudl be way easier using PW's $session and am drawing a blank. Grateful of any ideas or past experiences which may help diagnose this! Link to comment Share on other sites More sharing options...
Zeka Posted May 2, 2022 Share Posted May 2, 2022 Hi @prestoav Try to output this https://processwire.com/api/ref/session/get-all/ Link to comment Share on other sites More sharing options...
prestoav Posted May 2, 2022 Author Share Posted May 2, 2022 1 hour ago, Zeka said: Hi @prestoav Try to output this https://processwire.com/api/ref/session/get-all/ Hi Zeka, Thank you for the suggestion. Sadly that just gives a blank array and the error 'Notice: Array to string conversion'. Stay safe my friend. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now