/**
* Method to recover the full object on unserialize.
*
* @return void
*
* @since 3.6.0
*/
public function __wakeup()
{
// Initialise some variables
$this->_params = new Registry();
// Load the user if it exists
if (!empty($this->id) && $this->load($this->id)) {
// Push user into cached instances.
self::$instances[$this->id] = $this;
} else {
// Initialise
$this->id = 0;
$this->sendEmail = 0;
$this->aid = 0;
$this->guest = 1;
}
}