Is $_SESSION still supported vs. jSession?

I have previously used the $_SESSION variable to access user inputs on a search form, this no longer appears to be supported. The only field within the $_SESSION variable is $_SESSION['joomla']. I'm using code that previously functioned without issue.

Are you no longer supporting $_SESSION and instead using jSession or some alternative mechanism?

Thanks, Ron
 
Figured it out, code sample below to access a field call organization_id on the form search_criteria.

$session = JFactory::getSession();
$sessionObject = $session->get('com_fabrik');
$formData = $sessionObject->form->data;
$organizationID = $formData['search_criteria___organization_id'][0];

Hope this helps.

Cheers, Ron
 
Just for info Joomla recently change the way it stores its sesssion data due to security issues, which is probably why your code no longer worked. Accessing the data in the way you described is fine
You could use this as well:

PHP:
$session = JFactory::getSession();
$formData= $session->get('com_fabrik.form.data');
$organizationID = $formData['search_criteria___organization_id'][0];

the dot syntax transverses down the session array/objects to grab the section of the session data you require.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top