Remove notice
This commit is contained in:
parent
3bc0973056
commit
c8f3684620
@ -83,6 +83,10 @@ class UserController extends Zend_Controller_Action
|
||||
$login = $request->getParam('login', '');
|
||||
$op = $request->getParam('op');
|
||||
|
||||
//Récupération des informations de l'identité
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
|
||||
//Save data
|
||||
if ( $request->isPost() ) {
|
||||
$options = $request->getParam('frmOptions', '');
|
||||
@ -117,59 +121,36 @@ class UserController extends Zend_Controller_Action
|
||||
$message = 'Compte mis à jour.';
|
||||
}
|
||||
}
|
||||
|
||||
//Write change in session
|
||||
if ($identity->idClient == $options['idClient'] && $identity->username == $login) {
|
||||
//Modification lors du changement de mot de passe
|
||||
if ($options['changepwd']==1 && $updateResult) {
|
||||
|
||||
$identity->password = md5($login.'|'.$options['password']);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Mise à jour du profil
|
||||
if ($isProfilUpdated && $updateResult) {
|
||||
|
||||
$identity = $this->updateProfil($identity->username, $identity->password);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Gestion mode edition en SESSION
|
||||
if ($action=='update') {
|
||||
$modeEdition = $request->getParam('modeEdition', false);
|
||||
if ( $modeEdition ) {
|
||||
|
||||
$identity->modeEdition = true;
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Liste des catégories des accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Liste de toutes les préférences
|
||||
$listePrefs = $ws->getListePrefs();
|
||||
$prefsLib = array();
|
||||
foreach($listePrefs->item as $pref) {
|
||||
$prefsLib[strtoupper($pref->code)] = $pref->desc;
|
||||
}
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
|
||||
//Récupération des informations de l'identité
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$identity = $auth->getIdentity();
|
||||
if (isset($options['idClient']) && $identity->idClient == $options['idClient'] && $identity->username == $login) {
|
||||
//Modification lors du changement de mot de passe
|
||||
if ($options['changepwd']==1 && $updateResult) {
|
||||
|
||||
$identity->password = md5($login.'|'.$options['password']);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Mise à jour du profil
|
||||
if ($isProfilUpdated && $updateResult) {
|
||||
|
||||
$identity = $this->updateProfil($identity->username, $identity->password);
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
//Gestion mode edition en SESSION
|
||||
if ($action=='update') {
|
||||
$modeEdition = $request->getParam('modeEdition', false);
|
||||
if ( $modeEdition ) {
|
||||
|
||||
$identity->modeEdition = true;
|
||||
$auth->getStorage()->write($identity);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $isProfilUpdated || $isPasswordUpdated ) {
|
||||
$this->view->assign('message', $message);
|
||||
}
|
||||
@ -224,6 +205,27 @@ class UserController extends Zend_Controller_Action
|
||||
$this->view->assign('action', 'update');
|
||||
$this->view->assign('pref', explode(' ',$identity->pref));
|
||||
}
|
||||
|
||||
//Liste des catégories des accès
|
||||
$reponse = $ws->getCategory();
|
||||
$wscategory = $reponse->item;
|
||||
$this->view->assign('wscategory', $wscategory);
|
||||
|
||||
//Liste de tous les droits
|
||||
$listeDroits = $ws->getListeDroits();
|
||||
$droitsLib = array();
|
||||
foreach($listeDroits->item as $droit) {
|
||||
$droitsLib[strtoupper($droit->code)] = $droit->desc;
|
||||
}
|
||||
$this->view->assign('droitsLib', $droitsLib);
|
||||
|
||||
//Liste de toutes les préférences
|
||||
$listePrefs = $ws->getListePrefs();
|
||||
$prefsLib = array();
|
||||
foreach($listePrefs->item as $pref) {
|
||||
$prefsLib[strtoupper($pref->code)] = $pref->desc;
|
||||
}
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user