Redirection vers URL en session
This commit is contained in:
parent
b9eb7e54e5
commit
daf5519dd3
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user