14 de jul. 2009

Variables de usuarios joomla

JUser

Description

User class. Handles all application interaction with a user

  • since: 1.5

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 $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 boolean bind ( &$array, array $array)
Method mixed defParam (string $key, mixed $value)
Method boolean delete (boolean $updateOnly)
Method JUser &getInstance ([int $id = 0])
Method mixed getParam (string $key, [mixed $default = null])
Method object The &getParameters ([boolean $loadsetupfile = false], [path $path = null])
Method object The &getTable ([string $type = null], [string $prefix = 'JTable'])
Method boolean load ( $id, mixed $identifier, string $path)
Method boolean save ([boolean $updateOnly = false])
Method boolean setLastVisit ([int $timestamp = null])
Method mixed setParam (string $key, mixed $value)
Method void setParameters (object The $params)
Variables
string $activation = null (line 106)

Description

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

Description

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

Description

string $email = null (line 52)

The email

int $gid = null (line 88)

The group id number

boolean $guest = null (line 124)

Description

int $id = null (line 34)

Unique id

datetime $lastvisitDate = null (line 100)

Description

string $name = null (line 40)

The users real name (or nickname)

string $params = null (line 112)

Description

string $password = null (line 58)

MD5 encrypted password

string $password_clear = '' (line 64)

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

datetime $registerDate = null (line 94)

Description

int $sendEmail = null (line 82)

Description

string $username = null (line 46)

The login name

string $usertype = null (line 70)

Description

string $_errorMsg = null (line 136)

Error message

object $_params = null (line 130)

User parameters

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
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 257)

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]
bind (line 378)

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

  • return: True on success
  • since: 1.5
  • access: public
boolean bind ( &$array, array $array)
  • array $array: The associative array to bind to the object
  • &$array
defParam (line 240)

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
delete (line 560)

Method to delete the JUser object from the database

  • return: True on success
  • since: 1.5
  • access: public
boolean delete (boolean $updateOnly)
  • boolean $updateOnly: Save the object only if not a new user
getInstance (line 176)

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 212)

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 296)

Method to get the user parameters

This function tries to load an xml file based on the users usertype. The filename of the xml file is the same as the usertype. The functionals has a static variable to store the parameters setup file base path. You can call this function statically to set the base path if needed.

  • return: user parameters object
  • since: 1.5
  • access: public
object The &getParameters ([boolean $loadsetupfile = false], [path $path = null])
  • boolean $loadsetupfile: If true, loads the parameters setup file. Default is false.
  • path $path: Set the parameters setup file base path to be used to load the user parameters.
getTable (line 349)

Method to get the user table object

This function uses a static variable to store the table name of the user table to it instantiates. You can call this function statically to set the table name if needed.

  • return: user table object
  • since: 1.5
  • access: public
object The &getTable ([string $type = null], [string $prefix = 'JTable'])
  • string $type: The user table name to be used
  • string $prefix: The user table prefix to be used
load (line 591)

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
save (line 490)

Method to save the JUser object to the database

  • return: True on success
  • since: 1.5
  • access: public
boolean save ([boolean $updateOnly = false])
  • boolean $updateOnly: Save the object only if not a new user
setLastVisit (line 274)

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 226)

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 331)

Method to get the user parameters

  • since: 1.5
  • access: public
void setParameters (object The $params)
  • object The $params: user parameters object

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()