From d1a3187cba7bb7a10092d52041a4f84f75faf588 Mon Sep 17 00:00:00 2001 From: afornerot Date: Tue, 23 Feb 2021 16:34:27 +0100 Subject: [PATCH] gestion attribut sAMAccountType AD --- .../src/Cadoles/CoreBundle/Service/ldapService.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php index d06ae67e..6516c0cb 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php @@ -440,7 +440,11 @@ class ldapService private function fillAttributesNiveau01(Niveau01 $niveau01, array &$attrs) { $attrs['cn'] = $niveau01->getLabel(); $attrs['gidNumber'] = $niveau01->getId(); - $attrs['siren'] = $niveau01->getSiren(); + $attrs['siren'] = $niveau01->getSiren(); + + if($this->type=="AD") { + $attrs['sAMAccountName'] = $niveau01->getLabel(); + } } public function getNiveau01DN($id) { @@ -530,6 +534,10 @@ class ldapService $attrs['gidNumber'] = $niveau02->getId(); $attrs['siret'] = $niveau02->getSiret(); $attrs['postalAddress'] = $niveau02->getPostaladress(); + + if($this->type=="AD") { + $attrs['sAMAccountName'] = $niveau02->getLabel(); + } } public function getNiveau02DN($id) { @@ -616,6 +624,10 @@ class ldapService $attrs['cn'] = $group->getLabel(); $attrs['gidNumber'] = $group->getId(); $attrs['mail'] = $group->getEmail(); + + if($this->type=="AD") { + $attrs['sAMAccountName'] = $group->getLabel(); + } } public function getGroupDN($id) {