JUser/getParameters
From Joomla! Documentation
< API16:JUser
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Method to get the user parameters
Syntax[edit]
getParameters($loadsetupfile=false, $path=null)
Parameter Name | Default Value | Description |
---|---|---|
$loadsetupfile | false | If true, loads the parameters setup file. Default is false. |
$path | null | Set the parameters setup file base path to be used to load the user parameters. |
Returns[edit]
object The user parameters object
Defined in[edit]
libraries/joomla/user/user.php
Importing[edit]
jimport( 'joomla.user.user' );
Source Body[edit]
function getParameters($loadsetupfile = false, $path = null)
{
static $parampath;
// Set a custom parampath if defined
if (isset($path)) {
$parampath = $path;
}
// Set the default parampath if not set already
if (!isset($parampath)) {
$parampath = JPATH_ADMINISTRATOR.DS.'components'.DS.'com_users'.DS.'models';
}
if ($loadsetupfile)
{
$type = str_replace(' ', '_', strtolower($this->usertype));
$file = $parampath.DS.$type.'.xml';
if (!file_exists($file)) {
$file = $parampath.DS.'user.xml';
}
$this->_params->loadSetupFile($file);
}
return $this->_params;
}
Examples[edit]
Code Examples[edit]