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 238 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

This example demonstrates how we can test if a user has logged in or
if the user is a guest:
$user =& JFactory::getUser();
if ($user->guest)
{
// user is a guest (is not logged in)
}
User Parameters
The params attribute is special. We design an INI string to store additional
parameters about a user. The users.xml file, located in the backend in the root of the
user's component, contains the default attributes.
This table details the default parameters defined in the users.xml file:
Parameter Description
admin_language Backend language
language Frontend language
editor User's editor of choice.
helpsite User's help site
timezone Time zone in which the user is located (hours offset from UTC+0)
To access these we use the getParam() and setParam() methods. We could directly
access the params attribute but we would then have to parse the data. This example
demonstrates how we determine the user's time zone:
// get the default time zone from the registry
$registry =& JFactory::getConfig();
$tzdefault = $registry->getValue('config.


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