Redirection vers URL en session

This commit is contained in:
Michael RICOIS 2011-01-11 09:11:54 +00:00
parent b9eb7e54e5
commit daf5519dd3

View File

@ -25,7 +25,6 @@ class UserController extends Zend_Controller_Action {
if ($form->isValid($formData)) {
$login = $form->getValue('login');
$pass = $form->getValue('pass');
$auth = Zend_Auth::getInstance();
$authAdapter = new WebAuthAdapter($login, $pass);
$result = $auth->authenticate($authAdapter);
@ -35,13 +34,18 @@ class UserController extends Zend_Controller_Action {
$this->view->message.= $message."<br/>";
}
} else {
$url = Zend_Registry::get('URL');
if (!empty($url)){
$this->_redirect($url);
}
$this->_redirect('/');
}
}
}
}
public function logoutAction(){
public function logoutAction()
{
Zend_Auth::getInstance()->clearIdentity();
}