config = new AauthConfig(); $this->aauth = new Aauth(); $this->request = Services::request(); helper('form'); helper('aauth'); } /** * Index * * @return void */ public function index() { $userId = $this->aauth->getUserId(); if ($input = $this->request->getPost()) { $email = $password = $username = null; if (! empty($input['email'])) { $email = $input['email']; } if (! empty($input['password'])) { $password = $input['password']; } if (! empty($input['username'])) { $username = $input['username']; } if (! $this->aauth->updateUser($userId, $email, $password, $username)) { $data['errors'] = $this->aauth->printErrors('
', true); } else { $data['infos'] = $this->aauth->printInfos('
', true); } } $data['useUsername'] = $this->config->loginUseUsername; echo view('Templates/Header', $data); echo view('Account/Edit', $data); echo view('Templates/Footer', $data); } }