Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($identifier=0, UserWrapper $userHelper=null) | |
getParam ($key, $default=null) | |
setParam ($key, $value) | |
defParam ($key, $value) | |
authorise ($action, $assetname=null) | |
getAuthorisedCategories ($component, $action) | |
getAuthorisedViewLevels () | |
getAuthorisedGroups () | |
clearAccessRights () | |
setLastVisit ($timestamp=null) | |
getParameters () | |
getTimezone () | |
setParameters ($params) | |
bind (&$array) | |
save ($updateOnly=false) | |
delete () | |
load ($id) | |
__sleep () | |
__wakeup () | |
Fonctions membres publiques statiques | |
static | getInstance ($identifier=0, UserWrapper $userHelper=null) |
static | getTable ($type=null, $prefix='JTable') |
Champs de données | |
$id = null | |
$name = null | |
$username = null | |
$email = null | |
$password = null | |
$password_clear = '' | |
$block = null | |
$sendEmail = null | |
$registerDate = null | |
$lastvisitDate = null | |
$activation = null | |
$params = null | |
$groups = array() | |
$guest = null | |
$lastResetTime = null | |
$resetCount = null | |
$requireReset = null | |
Attributs protégés | |
$isRoot = null | |
$_params = null | |
$_authGroups = null | |
$_authLevels = null | |
$_authActions = null | |
$_errorMsg = null | |
$userHelper = null | |
Attributs protégés statiques | |
static | $instances = array() |
User class. Handles all application interaction with a user
__construct | ( | $identifier = 0 , |
|
UserWrapper | $userHelper = null |
||
) |
Constructor activating the default information of the language
integer | $identifier | The primary key of the user to load (optional). |
UserWrapper | $userHelper | The UserWrapper for the static methods. [ |
Références User\$userHelper, User\load(), et null.
__sleep | ( | ) |
Method to allow serialize the object with minimal properties.
__wakeup | ( | ) |
Method to recover the full object on unserialize.
Références User\$id, et User\load().
authorise | ( | $action, | |
$assetname = null |
|||
) |
Method to check User object authorisation against an access control object and optionally an access extension object
string | $action | The name of the action to check for permission. |
string | $assetname | The name of the asset on which to perform the action. |
Références $action, Access\check(), elseif, Access\getAssetRules(), User\getAuthorisedGroups(), null, et true.
Référencé par UsersControllerUser\allowEdit(), et User\getAuthorisedCategories().
bind | ( | & | $array | ) |
Method to bind an associative array of data to a user object
array | &$array | The associative array to bind to the object |
Références User\$params, User\$password, et ArrayHelper\getValue().
clearAccessRights | ( | ) |
Clears the access rights cache of this user
Références Access\clearStatics(), et null.
defParam | ( | $key, | |
$value | |||
) |
delete | ( | ) |
Method to delete the User object from the database
Références $dispatcher, JEventDispatcher\getInstance(), User\getTable(), et PluginHelper\importPlugin().
getAuthorisedCategories | ( | $component, | |
$action | |||
) |
Method to return a list of all categories that a user has permission for a given action
string | $component | The component from which to retrieve the categories |
string | $action | The name of the section within the component from which to retrieve the actions. |
Références $action, $category, $component, $db, $query, et User\authorise().
getAuthorisedGroups | ( | ) |
Gets an array of the authorised user groups
Références User\$_authGroups, Access\getGroupsByUser(), et null.
Référencé par User\authorise().
getAuthorisedViewLevels | ( | ) |
Gets an array of the authorised access levels for the user
Références User\$_authLevels, Access\getAuthorisedViewLevels(), et null.
|
static |
Returns the global User object, only creating it if it doesn't already exist.
integer | $identifier | The primary key of the user to load (optional). |
UserWrapper | $userHelper | The UserWrapper for the static methods. [ |
Références User\$id, $user, User\$userHelper, et null.
Référencé par PlgUserJoomla\_getUser(), UserHelper\activateUser(), UserHelper\addUserToGroup(), UserField\getLayoutData(), Factory\getUser(), UserHelper\getUserGroups(), PlgSystemActionLogs\onContentPrepareData(), PlgSystemActionLogs\onContentPrepareForm(), PlgActionlogJoomla\onUserLogout(), UserHelper\removeUserFromGroup(), et UserHelper\setUserGroups().
getParam | ( | $key, | |
$default = null |
|||
) |
Method to get a parameter value
string | $key | Parameter key |
mixed | $default | Parameter default value |
Référencé par User\getTimezone().
getParameters | ( | ) |
Method to get the user parameters
This method used to load the user parameters from a file.
Références User\$_params.
|
static |
Method to get the user table object
This function uses a static variable to store the table name of the user table to instantiate. You can call this function statically to set the table name if needed.
string | $type | The user table name to be used |
string | $prefix | The user table prefix to be used |
Références $prefix, $type, et Table\getInstance().
Référencé par UsersModelUser\activate(), UsersModelUser\block(), UsersModelUser\delete(), User\delete(), User\load(), User\save(), et User\setLastVisit().
getTimezone | ( | ) |
Method to get the user timezone.
If the user didn't set a timezone, it will return the server timezone
Références User\getParam().
load | ( | $id | ) |
Method to load a User object by user id number
mixed | $id | The user id of the user to load |
Références User\$id, et User\getTable().
Référencé par User\__construct(), et User\__wakeup().
save | ( | $updateOnly = false | ) |
Method to save the User object to the database
boolean | $updateOnly | Save the object only if not a new user Currently only used in the user reset password method. |
Références $dispatcher, User\$password, Access\check(), Access\checkGroup(), JEventDispatcher\getInstance(), User\getTable(), PluginHelper\importPlugin(), et null.
setLastVisit | ( | $timestamp = null | ) |
Pass through method to the table for setting the last visit date
integer | $timestamp | The timestamp, defaults to 'now'. |
Références User\getTable().
setParam | ( | $key, | |
$value | |||
) |
setParameters | ( | $params | ) |
Method to get the user parameters
object | $params | The user parameters object |
Références User\$params.
|
protected |
|
protected |
Référencé par User\getAuthorisedGroups().
|
protected |
Référencé par User\getAuthorisedViewLevels().
|
protected |
|
protected |
Référencé par User\getParameters().
$activation = null |
Référencé par UserWrapper\activateUser(), et UserHelper\activateUser().
$email = null |
$groups = array() |
Référencé par UserWrapper\setUserGroups(), et UserHelper\setUserGroups().
$guest = null |
Référencé par User\__wakeup(), UserHelper\activateUser(), User\getInstance(), et User\load().
|
staticprotected |
|
protected |
$lastResetTime = null |
$lastvisitDate = null |
$params = null |
Référencé par User\bind(), et User\setParameters().
$password = null |
$password_clear = '' |
$registerDate = null |
$requireReset = null |
$resetCount = null |
$sendEmail = null |
|
protected |
Référencé par User\__construct(), et User\getInstance().
$username = null |
Référencé par UserWrapper\getUserId(), et UserHelper\getUserId().