enlever les caractères interdis des groupes venant d'only (ref #84)

This commit is contained in:
afornerot 2020-02-26 10:37:06 +01:00
parent bc07bec8d1
commit b56ea851d1
2 changed files with 4 additions and 1 deletions

View File

@ -224,6 +224,9 @@ class OnlyCommand extends Command
if(!$group) {
$namegroup=$onlygroup->id." - ".$onlygroup->title;
// On enlève les caractères interdis
$namegroup=preg_replace('~[^ éèêôöàïî\'@a-zA-Z0-9._-]~', '', $namegroup);
// Ce nom de groupe existe-t-il déjà si oui erreur
$group=$this->em->getRepository("CadolesCoreBundle:Group")->findBy(["label"=>$namegroup]);
if($group)

View File

@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}lRLCD0OyEfitEztLVCVC4rLPUnTjIDuY
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}oBuVhAUjam9tCeMBwS0xBsAM2PdHZLW3
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');