Message lors de mauvaise connexion sur la page logout lors de la connexion par URL ou soumission formulaire, issue #0001089

This commit is contained in:
Michael RICOIS 2012-03-06 10:15:24 +00:00
parent 241861d102
commit 897a98fae8
2 changed files with 13 additions and 4 deletions

View File

@ -388,8 +388,11 @@ class UserController extends Zend_Controller_Action
Zend_Auth::getInstance()->clearIdentity();
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$message = $request->getParam('message');
$this->view->assign('message', $message);
$url = 'http://www.scores-decisions.com/';
$refresh = 5;
if (APPLICATION_ENV != 'production'){
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(

View File

@ -37,14 +37,20 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
$authAdapter = new WebAuthAdapter($login, $hach, $iponly);
$result = $auth->authenticate($authAdapter);
$firebug = Zend_Registry::get('firebug');
$firebug->info($result);
if (!$result->isValid()) {
$this->view->message = '';
$messageF = '';
foreach ($result->getMessages() as $message) {
$this->view->message.= $message."<br/>";
$messageF.= $message."<br/>";
}
$request->setModuleName('default')
->setControllerName('user')
->setActionName('logout');
->setActionName('logout')
->setParam('message', $messageF);
} else {
$timeout = $auth->getIdentity()->timeout;
Zend_Session::rememberMe($timeout);