Back to User class

Method __construct

public
__construct
(mixed $identifier = 0)
Constructor activating the default information of the language
Parameters
  • int $identifier The primary key of the user to load (optional).
Since
  • 1.7.0
Class: User
Project: Joomla

Method __construct - Source code

/**
 * Constructor activating the default information of the language
 *
 * @param   integer  $identifier  The primary key of the user to load (optional).
 *
 * @since   1.7.0
 */
public function __construct($identifier = 0)
{
    // Create the user parameters object
    $this->_params = new Registry();
    // Load the user if it exists
    if (!empty($identifier)) {
        $this->load($identifier);
    } else {
        // Initialise
        $this->id = 0;
        $this->sendEmail = 0;
        $this->aid = 0;
        $this->guest = 1;
    }
}