Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Session management in Garden
Hi,
I went through the Garden and I found that the Garden has its own session management code. It doesn't uses PHP's built-in session management code. Correct me If I'm wrong.
What is the advantage of that ?
Thanks a lot.
I went through the Garden and I found that the Garden has its own session management code. It doesn't uses PHP's built-in session management code. Correct me If I'm wrong.
What is the advantage of that ?
Thanks a lot.
0
Comments
For example : $_SESSION['name'] = 'value';
So I would like to know how can we achieve this in Garden?
$Session = Gdn::Session(); $Session->SetPreference('name', 'value'); // this is persistent $Session->SetAttribute('name', 'value'); // this will last until the next page load (often called flash data)
I created a persistent session data in home controller and tried to print it, It works.
e.g. :
$Session = Gdn::Session(); $Session->SetPreference('name', 'value'); echo $Session->GetPreference('name');
But problem is, being authenticated user when i tried to print the same session data in different controller( say settings), I didn't get anything.