From 7ec78a2a70f507b535f4c73ce18e05094e9e4852 Mon Sep 17 00:00:00 2001 From: afornerot Date: Thu, 12 Nov 2020 16:23:52 +0100 Subject: [PATCH] pb init --- src/nineschool-1.0/src/Command/SynchroUsersCommand.php | 2 +- src/nineschool-1.0/src/Controller/SecurityController.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nineschool-1.0/src/Command/SynchroUsersCommand.php b/src/nineschool-1.0/src/Command/SynchroUsersCommand.php index 42b71d7..81854bb 100644 --- a/src/nineschool-1.0/src/Command/SynchroUsersCommand.php +++ b/src/nineschool-1.0/src/Command/SynchroUsersCommand.php @@ -564,7 +564,7 @@ class SynchroUsersCommand extends Command $this->writeln($group->getName()); $usergroups=[]; - if($tabgroups[$group->getIdexternal()]) + if(array_key_exists($group->getIdexternal(),$tabgroups)&&$tabgroups[$group->getIdexternal()]) $usergroups = $tabgroups[$group->getIdexternal()]["users"]; $tbusers=[]; foreach($usergroups as $user) { diff --git a/src/nineschool-1.0/src/Controller/SecurityController.php b/src/nineschool-1.0/src/Controller/SecurityController.php index 09047ac..3a4568c 100755 --- a/src/nineschool-1.0/src/Controller/SecurityController.php +++ b/src/nineschool-1.0/src/Controller/SecurityController.php @@ -37,6 +37,9 @@ class SecurityController extends AbstractController } public function loginMYSQL(Request $request, AuthenticationUtils $authenticationUtils) { + // activer les activités par défaut + $this->get('session')->set('activeactivity',true); + return $this->render('Home/login.html.twig', array( 'last_username' => $authenticationUtils->getLastUsername(), 'error' => $authenticationUtils->getLastAuthenticationError(), @@ -117,6 +120,8 @@ class SecurityController extends AbstractController $this->updateLDAP($user); } + // activer les activités par défaut + $this->get('session')->set('activeactivity',true); // Autoconnexion // Récupérer le token de l'utilisateur