I have just noticed that methods setUserState() and getUserState() from JApplication are marked as deprecated.
But what are the replacements for these two methods ?
Thanks by advance
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.Sign up to join this community
They are not deprecated, it's Joomla's documentation that is not perfect.
You can notice that it returns
JApplicationCms and on this object it is not deprecated. You will also notice that it says to look at
\JApplication for more information, but this object is deprecated. Just call the right object.
$app = JFactory::getApplication();
Next time you better click on the reference of the returned object and not the link it says to see for more details :)