Class JUser

Description

User class. Handles all application interaction with a user

Located in /application/user/user.php (line 25)

JObject
   |
   --JUser
Variable Summary
 string $_errorMsg
 int $_id
 object $_model
 object $_params
Method Summary
 JUser __construct ([mixed $id = null])
 boolean authorize (string $acoSection, string $aco, [string $axoSection = null], [string $axo = null])
 boolean bind (array &$array)
 mixed defParam (string $key, mixed $value)
 mixed get (string $property, [mixed $default = null], mixed $value)
 string getError ()
 JUser &getInstance ([int $id = 'guest'])
 mixed getParam (string $key, [mixed $default = null])
 object The getParameters ()
 boolean save ([boolean $updateOnly = false])
 void set (string $property, [mixed $value = null])
 mixed setParam (string $key, mixed $value)
 void setParameters (string $data, [string $path = null])
 boolean _load (int $id, string $path)
 void _setError (string $msg)
Variables
string $_errorMsg = null (line 53)

Error message

int $_id = null (line 32)

User id

object $_model = null (line 39)

User model

object $_params = null (line 46)

User parameters

Methods
Constructor __construct (line 60)

Constructor activating the default information of the language

  • access: protected
JUser __construct ([mixed $id = null])

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
authorize (line 195)

Method to check JUser object authorization against an access control object and optionally an access extension object

  • return: True if authorized
  • since: 1.1
  • access: public
boolean authorize (string $acoSection, string $aco, [string $axoSection = null], [string $axo = null])
  • string $acoSection: The ACO section value
  • string $aco: The ACO value
  • string $axoSection: The AXO section value [optional]
  • string $axo: The AXO value [optional]
bind (line 256)

Method to bind an associative array of data to a user object

  • return: True on success
  • since: 1.1
  • access: private
boolean bind (array &$array)
  • array $array: The associative array to bind to the object
defParam (line 178)

Method to set a default parameter if it does not exist

  • return: Set parameter value
  • since: 1.1
  • access: public
mixed defParam (string $key, mixed $value)
  • string $key: Parameter key
  • mixed $value: Parameter value
get (line 134)

Overridden get method to get properties from the user model

  • return: The value of the property
  • since: 1.1
  • access: public
mixed get (string $property, [mixed $default = null], mixed $value)
  • string $property: The name of the property
  • mixed $value: The value of the property to set

Redefinition of:
JObject::get()
getError (line 243)

Method to get JUser error message

  • return: The error message
  • since: 1.1
  • access: public
string getError ()
getInstance (line 97)

Returns a reference to the global User object, only creating it if it doesn't already exist.

This method must be invoked as:

  $user = JUser :: getInstance($id);

  • return: The User object.
  • since: 1.1
  • access: public
JUser &getInstance ([int $id = 'guest'])
  • int $id: The user id to load.
getParam (line 150)

Method to get a parameter value

  • return: The value or the default if it did not exist
  • since: 1.1
  • access: public
mixed getParam (string $key, [mixed $default = null])
  • string $key: Parameter key
  • mixed $default: Parameter default value
getParameters (line 208)

Method to get the user parameters

  • return: user parameters object
  • since: 1.1
  • access: public
object The getParameters ()
save (line 311)

Method to save the JUser object to the database

  • return: True on success
  • since: 1.1
  • access: private
boolean save ([boolean $updateOnly = false])
  • boolean $updateOnly: Save the object only if not a new user
set (line 121)

Overridden set method to pass properties on to the user model

  • since: 1.1
  • access: public
void set (string $property, [mixed $value = null])
  • string $property: The name of the property
  • mixed $value: The value of the property to set

Redefinition of:
JObject::set()
setParam (line 164)

Method to set a parameter

  • return: Set parameter value
  • since: 1.1
  • access: public
mixed setParam (string $key, mixed $value)
  • string $key: Parameter key
  • mixed $value: Parameter value
setParameters (line 222)

Method to set the user parameters

  • since: 1.1
  • access: public
void setParameters (string $data, [string $path = null])
  • string $data: The paramters string in INI format
  • string $path: Path to the parameters xml file [optional]
_load (line 460)

Method to load a JUser object by user id number

  • return: True on success
  • since: 1.1
  • access: protected
boolean _load (int $id, string $path)
  • int $id: The user id for the user to load
  • string $path: Path to a parameters xml file
_setError (line 496)

Method to set an error message

  • since: 1.1
  • access: private
void _setError (string $msg)
  • string $msg: The message to append to the error message

Inherited Methods

Inherited From JObject

 JObject::__construct()
 JObject::JObject()
 JObject::get()
 JObject::set()
 JObject::toString()
 JObject::__destruct()

Documentation generated on Sat, 4 Feb 2006 14:27:40 +0100 by phpDocumentor 1.3.0RC4