\JUser
User class. Handles all application interaction with a user
Synopsis
class JUser
extends JObject
{
- // members
- protected $isRoot;
- public $id;
- public $name;
- public $username;
- public $email;
- public $password;
- public $password_clear;
- public $block;
- public $sendEmail;
- public datetime $registerDate;
- public datetime $lastvisitDate;
- public $activation;
- public JRegistry $params;
- public $groups;
- public $guest;
- public $lastResetTime;
- public $resetCount;
- protected JRegistry $_params;
- protected $_authGroups;
- protected $_authLevels;
- protected $_authActions;
- protected $_errorMsg;
- protected $instances;
- // Inherited members from JObject
- protected $_errors;
- // methods
- public void __construct()
- public static JUser getInstance()
- public mixed getParam()
- public mixed setParam()
- public mixed defParam()
- public boolean authorise()
- public array getAuthorisedCategories()
- public array getAuthorisedViewLevels()
- public array getAuthorisedGroups()
- public boolean setLastVisit()
- public getParameters()
- public void setParameters()
- public static getTable()
- public boolean bind()
- public boolean save()
- public boolean delete()
- public boolean load()
- // Inherited methods from JObject
- public void __construct()
- public string __toString()
- public mixed def()
- public mixed get()
- public array getProperties()
- public string getError()
- public array getErrors()
- public mixed set()
- public boolean setProperties()
- public void setError()
Hierarchy
Extends
Tasks
Tasks
Line | Task |
---|---|
381 | Modify the way permissions are stored in the db to allow for faster implementation and better scaling |
664 | ACL - this needs to be acl checked |
Members
protected
- $_authActions
—
array
Authorised access actions - $_authGroups
—
array
Authorised access groups - $_authLevels
—
array
Authorised access levels - $_errorMsg
—
string
Error message - $_errors
—
array
An array of error messages or Exception objects. - $_params
—
JRegistry
User parameters - $instances — array
- $isRoot
—
boolean
A cached switch for if this user has root access rights.
public
- $activation
—
string
Activation hash - $block
—
integer
Block status - $email
—
string
The email - $groups
—
array
Associative array of user names => group ids - $guest
—
boolean
Guest status - $id
—
integer
Unique id - $lastResetTime
—
string
Last Reset Time - $lastvisitDate
—
datetime
Date of last visit - $name
—
string
The user's real name (or nickname) - $params
—
JRegistry
User parameters - $password
—
string
MD5 encrypted password - $password_clear
—
string
Clear password, only available when a new password is set for a user - $registerDate
—
datetime
Date the user was registered - $resetCount
—
int
Count since last Reset Time - $sendEmail
—
integer
Should this user receive system email - $username
—
string
The login name
Methods
public
- __construct() — Constructor activating the default information of the language
- bind() — Method to bind an associative array of data to a user object
- defParam() — Method to set a default parameter if it does not exist
- delete() — Method to delete the JUser object from the database
- getAuthorisedCategories() — Method to return a list of all categories that a user has permission for a given action
- getAuthorisedGroups() — Gets an array of the authorised user groups
- getAuthorisedViewLevels() — Gets an array of the authorised access levels for the user
- getInstance() — Returns the global User object, only creating it if it doesn't already exist.
- getParam() — Method to get a parameter value
- getParameters() — Method to get the user parameters
- getTable() — Method to get the user table object
- load() — Method to load a JUser object by user id number
- save() — Method to save the JUser object to the database
- setLastVisit() — Pass through method to the table for setting the last visit date
- setParam() — Method to set a parameter
- setParameters() — Method to get the user parameters
Inherited from JObject
public
- __toString() — Magic method to convert the object to a string gracefully.
- def() — Sets a default value if not alreay assigned
- get() — Returns a property of the object or the default value if the property is not set.
- getError() — Get the most recent error message.
- getErrors() — Return all errors, if any.
- getProperties() — Returns an associative array of object properties.
- set() — Modifies a property of the object, creating it if it does not already exist.
- setError() — Add an error message.
- setProperties() — Set the object properties based on a named array/hash.