Correction identité

This commit is contained in:
Michael RICOIS 2011-01-24 15:47:24 +00:00
parent 9d6364779c
commit 2d4aea4585

View File

@ -29,15 +29,13 @@ class IndexController extends Zend_Controller_Action
),
);
$username = Zend_Auth::getInstance()->getIdentity();
$username = Zend_Auth::getInstance()->getIdentity()->username;
$displayWs = array();
foreach($listeWs as $key => $ws)
{
if ( count($ws['protect'])>0 && !in_array($username, $ws['protect']) )
if ( count($ws['protect'])==0 || in_array($username, $ws['protect']) )
{
$displayWs[$key] = $ws;
} else {
$displayWs[$key] = $ws;
}
}
$this->view->assign('ws', $displayWs);