Mam problem z Zend_Auth, logowanie przebiega z sukcesem lecz nie zapisuję mi sesji.
Kod logowania:
public function loginAction() { if($this -> getRequest() -> isPost()) { $auth = new Zend_Auth_Adapter_DbTable($db); $auth -> setTableName('users') -> setIdentityColumn('name') -> setCredentialColumn('password'); $auth -> setIdentity($this -> getRequest() -> getPost('name')) -> setCredential($this -> getRequest() ->getPost('password')); $result = $auth -> authenticate($auth); if($result -> getCode() == Zend_Auth_Result::SUCCESS) { $this -> view -> status = "Logowanie się powiodło"; } else { $this -> view -> status = 'Logowanie się nie powiodło'; } } $this -> view -> content = self::buildForm(); }
W zmiennej status w widoku ladnie sie pojawia ze logowanie sie powiodlo wrazie podania prawidlowych danych lecz gdy odswieze strone drugi raz to powinno zadzialac print_r($this->ZendAuth->getIdentity()); lecz niestety nic nie wyswietla ... Nawet hasIdentity zwraca za kazdym razem FALSE. Co moze byc nie tak ?