Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($identifier=0) | |
getParam ($key, $default=null) | |
setParam ($key, $value) | |
defParam ($key, $value) | |
authorise ($action, $assetname=null) | |
getAuthorisedCategories ($component, $action) | |
getAuthorisedViewLevels () | |
getAuthorisedGroups () | |
clearAccessRights () | |
getTimezone () | |
setParameters ($params) | |
bind (&$array) | |
save ($updateOnly=false) | |
delete () | |
load ($id) | |
__sleep () | |
__wakeup () | |
Fonctions membres publiques hérités de CMSObject | |
__construct ($properties=null) | |
__toString () | |
def ($property, $default=null) | |
get ($property, $default=null) | |
getProperties ($public=true) | |
getError ($i=null, $toString=true) | |
getErrors () | |
set ($property, $value=null) | |
setProperties ($properties) | |
setError ($error) | |
Fonctions membres publiques statiques | |
static | getInstance ($identifier=0) |
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 | |
Attributs protégés hérités de CMSObject | |
$_errors = array() | |
Attributs protégés statiques | |
static | $instances = array() |
User class. Handles all application interaction with a user
__construct | ( | $identifier = 0 | ) |
Constructor activating the default information of the language
integer | $identifier | The primary key of the user to load (optional). |
Références User\load().
__sleep | ( | ) |
Method to allow serialize the object with minimal properties.
__wakeup | ( | ) |
Method to recover the full object on unserialize.
Références User\$id, $this, 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 Access\check(), elseif, Factory\getApplication(), Access\getAssetRules(), User\getAuthorisedGroups(), null, et true.
Référencé par 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, Text\_(), UserHelper\genRandomPassword(), Factory\getApplication(), Factory\getDate(), ArrayHelper\getValue(), UserHelper\hashPassword(), CMSObject\setError(), et CMSObject\setProperties().
Référencé par UserHelper\activateUser(), UserHelper\addUserToGroup(), PlgPrivacyUser\createNotesDomain(), PlgPrivacyUser\createProfileDomain(), User\getAuthorisedCategories(), UserHelper\getUserId(), et UserFactory\loadUserByUsername().
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 $result, $this, Factory\getApplication(), CMSObject\getError(), CMSObject\getProperties(), User\getTable(), PluginHelper\importPlugin(), et CMSObject\setError().
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 $category, $component, $db, $query, User\authorise(), User\bind(), et Factory\getDbo().
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). |
Références User\$id, class, et Factory\getContainer().
Référencé par PlgUserJoomla\_getUser(), ContactController\_sendEmail(), UserHelper\activateUser(), HtmlView\addToolbar(), UserHelper\addUserToGroup(), ChangeUserPasswordCommand\doExecute(), DeleteUserCommand\doExecute(), AddUserToGroupCommand\doExecute(), RemoveUserFromGroupCommand\doExecute(), AddUserCommand\doExecute(), Access\getAuthorisedViewLevels(), UserField\getLayoutData(), Factory\getUser(), UserHelper\getUserGroups(), PlgContentJoomla\onContentAfterSave(), PlgAuthenticationJoomla\onUserAuthenticate(), Joomla\onUserLogout(), ResetModel\processResetComplete(), ResetModel\processResetRequest(), UserHelper\removeUserFromGroup(), UserModel\save(), MessageModel\save(), 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().
|
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 User\delete(), User\load(), et User\save().
getTimezone | ( | ) |
Method to get the user timezone.
If the user didn't set a timezone, it will return the server timezone
Références Factory\getApplication(), et 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, Log\add(), User\getTable(), CMSObject\setProperties(), Text\sprintf(), et Log\WARNING.
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 User\$password, $result, $this, Access\check(), Access\checkGroup(), Factory\getApplication(), CMSObject\getError(), CMSObject\getProperties(), User\getTable(), Factory\getUser(), PluginHelper\importPlugin(), null, et CMSObject\setError().
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 |
$activation = null |
Référencé par UserHelper\activateUser().
$email = null |
$groups = array() |
Référencé par UserHelper\setUserGroups().
$guest = null |
Référencé par User\__wakeup(), UserHelper\activateUser(), User\getInstance(), User\load(), et UserFactory\loadUserById().
|
staticprotected |
|
protected |
$lastResetTime = null |
$lastvisitDate = null |
$params = null |
Référencé par User\bind(), et User\setParameters().
$password = null |
Référencé par User\bind(), UserHelper\hashPassword(), et User\save().
$password_clear = '' |
$registerDate = null |
$requireReset = null |
$resetCount = null |
$sendEmail = null |
$username = null |
Référencé par UserHelper\getUserId(), et UserFactory\loadUserByUsername().