public function login() { $db = new Modelo(); $db->_tabela = $this->tableName; $where = $this->userColumn . "='" . $this->user . "' and " . $this->passColumn . "='" . $this->pass . "'"; $sql = $db->ler($where); if (isset($sql[0]['id_usuario'])) { if ($sql[0]['login'] == $this->user) { if ($sql[0]['senha'] == $this->pass) { $this->sessionHelper->createSession("userAuth", TRUE)->createSession("userData", $sql[0]); } else { $this->loginController = 'Usuario'; $this->loginAction = 'dados_in'; } } else { $this->loginController = 'Usuario'; $this->loginAction = 'dados_in'; } } else { $this->loginController = 'Usuario'; $this->loginAction = 'dados_in'; } $this->redirectorHelper->goToControladorAcao($this->loginController, $this->loginAction); return $this; }