Unverified Commit 373beffc authored by Côme Chilliet's avatar Côme Chilliet
Browse files

feat(sinaps) Store role->externe->identifiantStructureInterne in...

 feat(sinaps) Store role->externe->identifiantStructureInterne in supannEntiteAffectationPrincipale

issue #5918
parent 2456f162
......@@ -278,6 +278,16 @@ class sinapsRequest
break 2;
}
if (in_array_ics((string)$role->externe->typeExterne, $userRoleExists[(string)$role->typeRole])) {
if (!empty($role->externe->identifiantStructureInterne)) {
/* Store identifiantStructureInterne in supannEntiteAffectationPrincipale */
$UUID = (string)$role->externe->identifiantStructureInterne;
$entite = $ldapUuidToCodeEntiteCallback($UUID);
if (isset($entite['supannTypeEntite'])) {
$values['supannAccount']['supannTypeEntiteAffectation'][] = $entite['supannTypeEntite'];
}
$values['supannAccount']['supannEntiteAffectation'][] = $entite['supannCodeEntite'];
$values['supannAccount']['supannEntiteAffectationPrincipale'] = $entite['supannCodeEntite'];
}
$deletion = FALSE;
break 2;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment