config = new AauthConfig(); $this->aauth = new Aauth(); $this->request = Services::request(); helper('form'); } /** * Index * * @return redirect */ public function index() { if ($input = $this->request->getVar()) { $identifier = ($this->config->loginUseUsername ? $input['username'] : $input['email']); if (! $this->aauth->login($identifier, $input['password'], (isset($input['remember']) ? true : false))) { $data['errors'] = $this->aauth->printErrors('
', true); } else { return redirect()->to('/account'); } } $data['useUsername'] = $this->config->loginUseUsername; $data['cssFiles'] = [ '/assets/css/login.css' ]; echo view('Templates/HeaderBlank', $data); echo view('Account/Login', $data); echo view('Templates/FooterBlank', $data); } }