Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JUser

Description

User class. Handles all application interaction with a user

Located in /joomla/user/user.php (line 28)

Class JObject   (Subpackage Base)

Class JUser   (Subpackage User)
Variable Summary
Variable string $activation
Variable string $aid
Variable int $block
Variable string $clearPW
Variable string $email
Variable int $gid
Variable boolean $guest
Variable int $id
Variable datetime $lastvisitDate
Variable string $name
Variable string $params
Variable string $password
Variable datetime $registerDate
Variable string $username
Variable string $usertype
Variable string $_errorMsg
Variable object $_params
Method Summary
Constructor JUser __construct ([ $identifier = 0])
Method boolean authorize (string $acoSection, string $aco, [string $axoSection = null], [string $axo = null])
Method mixed defParam (string $key, mixed $value)
Method string getError ()
Method JUser &getInstance ([int $id = 0])
Method mixed getParam (string $key, [mixed $default = null])
Method object The getParameters ()
Method object The &getTable ()
Method boolean load ( $id, mixed $identifier, string $path)
Method boolean setLastVisit ([int $timestamp = null])
Method mixed setParam (string $key, mixed $value)
Method void setParameters (string $data, [string $path = null])
Method boolean _bind ($array $from, [$ignore $ignore = ''])
Variables
string $activation = null (line 100)

Description

  • var: activation hash
string $aid = null (line 112)

Description

  • var: integer
int $block = null (line 70)

Description

string $clearPW = '' (line 136)

Clear password, only available when a new password is set for a user

string $email = null (line 52)

The email

int $gid = null (line 82)

The group id number

boolean $guest = null (line 118)

Description

int $id = null (line 34)

Unique id

datetime $lastvisitDate = null (line 94)

Description

string $name = null (line 40)

The users real name (or nickname)

string $params = null (line 106)

Description

string $password = null (line 58)

MD5 encrypted password

datetime $registerDate = null (line 88)

Description

int $sendEmail = null (line 76)

Description

string $username = null (line 46)

The login name

string $usertype = null (line 64)

Description

string $_errorMsg = null (line 130)

Error message

object $_params = null (line 124)

User parameters

Methods
Constructor __construct (line 144)

Constructor activating the default information of the language

  • access: protected
JUser __construct ( $identifier)
  • $identifier

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

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

  • return: True if authorized
  • since: 1.5
  • 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]
defParam (line 237)

Method to set a default parameter if it does not exist

  • return: Set parameter value
  • since: 1.5
  • access: public
mixed defParam (string $key, mixed $value)
  • string $key: Parameter key
  • mixed $value: Parameter value
getError (line 333)

Method to get JUser error message

  • return: The error message
  • since: 1.5
  • access: public
string getError ()
getInstance (line 174)

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.5
  • access: public
JUser &getInstance (int $id)
  • int $id: The user to load - Can be an integer or string - If string, it is converted to ID automatically.
getParam (line 209)

Method to get a parameter value

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

Method to get the user parameters

  • return: user parameters object
  • since: 1.5
  • access: public
object The getParameters ()
getTable (line 296)

Method to get the user table object

  • return: user table object
  • since: 1.5
  • access: public
object The &getTable ()
load (line 565)

Method to load a JUser object by user id number

  • return: True on success
  • since: 1.5
  • access: public
boolean load ( $id, mixed $identifier, string $path)
  • mixed $identifier: The user id of the user to load
  • string $path: Path to a parameters xml file
  • $id
setLastVisit (line 268)

Pass through method to the table for setting the last visit date

  • return: True on success
  • since: 1.5
  • access: public
boolean setLastVisit ([int $timestamp = null])
  • int $timestamp: The timestamp, defaults to 'now'
setParam (line 223)

Method to set a parameter

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

Method to set the user parameters

  • since: 1.5
  • 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]
_bind (line 599)

Binds a named array/hash to this object

  • since: 1.5
  • access: protected
boolean _bind ($array $from, [$ignore $ignore = ''])
  • $array $from: mixed Either and associative array or another object
  • $ignore $ignore: string Space separated list of fields not to bind

Inherited Methods

Inherited From JObject

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

Documentation generated on Mon, 05 Mar 2007 21:30:26 +0000 by phpDocumentor 1.3.1