SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 239 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

offset');
// get the user's time zone
$user =& JFactory::getUser();
$tz = $user->getParam('timezone', $tzdefault);
Notice that we supply a default value, $tzdefault, which is extracted from the site
settings. We use this as the second parameter for getParam(); this parameter
is optional.
This example demonstrates how we can modify the value of the user's time zone:
$user =& JFactory::getUser();
$user->setParam('timezone', '0');
Chapter 7
[ 179 ]
When we perform any modifications to the user's session, unless we save the
changes, the modifications will last only until the session expires. User parameters
are not used as a temporary store. To store temporary data we should use the session
and the user state; we will see both in the next section.
If we store temporary data in user parameters, we run the risk
of saving the data accidently to the user's database record.
A common design issue is the extension of the user beyond their predefined
attributes. There are three common ways of dealing with this:
Add additional fields to the #__users table.


Pages:
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6