Support Joomla!

references:joomla.framework:application:japplication-getuserstate

Table of Contents

getUserState

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JApplication Method getUserState Reference getUserState() Never Work in Progress

Gets the value of the user state variable. User state variables are stored with the session and are persistent between requests.

Syntax

mixed getUserState ( $key )

$key string is a string containing the path of the state.

Examples

If the following code was executed on a previous page load:

Example

global $mainframe;

$mainframe->setUserState( "$option.sampleState", "Stored value" );

then the following code:

Example

global $mainframe;

echo $mainframe->getUserState( "$option.sampleState" );

will produce

Result

Stored value

 
references/joomla.framework/application/japplication-getuserstate.txt (845 views) · Last modified: 2007/08/15 14:50