/** * Method to load a User object by user id number * * @param integer $id The user id of the user to load * * @return boolean True on success */ public function load($id) { $table = new UserTable(); // Load the UserTable object based on the user id or throw a warning. if (!$table->load($id)) { $this->app->enqueueMessage(TextHelper::sprintf('JLIB_USER_ERROR_UNABLE_TO_LOAD_USER', $id), 'error'); return false; } $this->setProperties($table->getProperties()); unset($this->password); return true; }