Difference between revisions of "JUser"
From Joomla! Documentation
m (→User contributed notes: bad link repair) |
m (preparing for archive only) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
=={{JVer|11.1}} JUser== | =={{JVer|11.1}} JUser== | ||
===Description=== | ===Description=== | ||
− | + | ||
− | + | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 14: | Line 12: | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::__construct | + | |[[API17:JUser::__construct|__construct]] |
|Constructor activating the default information of the language. | |Constructor activating the default information of the language. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::authorise | + | |[[API17:JUser::authorise|authorise]] |
|Method to check object authorisation against an access control object and optionally an access extension object. | |Method to check object authorisation against an access control object and optionally an access extension object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::authorisedLevels | + | |[[API17:JUser::authorisedLevels|authorisedLevels]] |
| | | | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::authorize | + | |[[API17:JUser::authorize|authorize]] |
| | | | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::bind | + | |[[API17:JUser::bind|bind]] |
|Method to bind an associative array of data to a user object. | |Method to bind an associative array of data to a user object. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::defParam | + | |[[API17:JUser::defParam|defParam]] |
|Method to set a default parameter if it does not exist. | |Method to set a default parameter if it does not exist. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::delete | + | |[[API17:JUser::delete|delete]] |
|Method to delete the object from the database. | |Method to delete the object from the database. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::getAuthorisedCategories | + | |[[API17:JUser::getAuthorisedCategories|getAuthorisedCategories]] |
|Method to return a list of all categories that a user has permission for a given action. | |Method to return a list of all categories that a user has permission for a given action. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::getAuthorisedGroups | + | |[[API17:JUser::getAuthorisedGroups|getAuthorisedGroups]] |
|Gets an array of the authorised user groups. | |Gets an array of the authorised user groups. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::getAuthorisedViewLevels | + | |[[API17:JUser::getAuthorisedViewLevels|getAuthorisedViewLevels]] |
|Gets an array of the authorised access levels for the user. | |Gets an array of the authorised access levels for the user. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::getParam | + | |[[API17:JUser::getParam|getParam]] |
|Method to get a parameter value. | |Method to get a parameter value. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::getParameters | + | |[[API17:JUser::getParameters|getParameters]] |
|Method to get the user parameters. | |Method to get the user parameters. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::load | + | |[[API17:JUser::load|load]] |
|Method to load a object by user id number. | |Method to load a object by user id number. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::save | + | |[[API17:JUser::save|save]] |
|Method to save the object to the database. | |Method to save the object to the database. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::setLastVisit | + | |[[API17:JUser::setLastVisit|setLastVisit]] |
|Pass through method to the table for setting the last visit date. | |Pass through method to the table for setting the last visit date. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::setParam | + | |[[API17:JUser::setParam|setParam]] |
|Method to set a parameter. | |Method to set a parameter. | ||
|- | |- | ||
|public | |public | ||
− | |[[JUser::setParameters | + | |[[API17:JUser::setParameters|setParameters]] |
|Method to get the user parameters. | |Method to get the user parameters. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JUser::getInstance | + | |[[API17:JUser::getInstance|getInstance]] |
|Returns the global User object, only creating it if it doesn't already exist. | |Returns the global User object, only creating it if it doesn't already exist. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JUser::getTable | + | |[[API17:JUser::getTable|getTable]] |
|Method to get the user table object. | |Method to get the user table object. | ||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/user/user.php | * '''Defined in''' libraries/joomla/user/user.php | ||
− | * '''Extends''' [[JObject | + | * '''Extends''' [[API17:JObject|JObject]] |
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.user.user' );</source> | <source lang="php">jimport( 'joomla.user.user' );</source> | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JUser source code''' on [[jplatform:user/user.php|BitBucket]] | * {{JVer|11.1}} '''JUser source code''' on [[jplatform:user/user.php|BitBucket]] | ||
− | * {{JVer|11.1}} Subpackage [[Subpackage User | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage User|User]] |
− | * [[JUser|Other versions of JUser]] | + | * [[API17:JUser|Other versions of JUser]] |
− | + | ||
− | + | ||
− | |||
− | |||
===User contributed notes=== | ===User contributed notes=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JUser | category=JUser | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
Line 113: | Line 109: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:55, 24 March 2017
The "API17" 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.
JUser[edit]
Description[edit]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | __construct | Constructor activating the default information of the language. |
public | authorise | Method to check object authorisation against an access control object and optionally an access extension object. |
public | authorisedLevels | |
public | authorize | |
public | bind | Method to bind an associative array of data to a user object. |
public | defParam | Method to set a default parameter if it does not exist. |
public | delete | Method to delete the object from the database. |
public | getAuthorisedCategories | Method to return a list of all categories that a user has permission for a given action. |
public | getAuthorisedGroups | Gets an array of the authorised user groups. |
public | getAuthorisedViewLevels | Gets an array of the authorised access levels for the user. |
public | getParam | Method to get a parameter value. |
public | getParameters | Method to get the user parameters. |
public | load | Method to load a object by user id number. |
public | save | Method to save the object to the database. |
public | setLastVisit | Pass through method to the table for setting the last visit date. |
public | setParam | Method to set a parameter. |
public | setParameters | Method to get the user parameters. |
public static | getInstance | Returns the global User object, only creating it if it doesn't already exist. |
public static | getTable | Method to get the user table object. |
- Defined in libraries/joomla/user/user.php
- Extends JObject
Importing[edit]
jimport( 'joomla.user.user' );
See also[edit]
- JUser source code on BitBucket
- Subpackage User
- Other versions of JUser
User contributed notes[edit]
Code Examples[edit]