/** * Initialize this User. * * @param Context A Context instance. * @param array An associative array of initialization parameters. * * @return bool true, if initialization completes successfully, otherwise * false. * * @throws <b>InitializationException</b> If an error occurs while * initializing this User. */ public function initialize($context, $parameters = null) { // initialize parent parent::initialize($context, $parameters); // read data from storage $storage = $this->getContext()->getStorage(); $this->authenticated = $storage->read(self::AUTH_NAMESPACE); $this->credentials = $storage->read(self::CREDENTIAL_NAMESPACE); if ($this->authenticated == null) { // initialize our data $this->authenticated = false; $this->credentials = array(); } }