mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
71 lines
1.2 KiB
PHP
71 lines
1.2 KiB
PHP
|
<?php
|
|||
|
|
|||
|
// filtre unique
|
|||
|
$filter['unique']=array(
|
|||
|
array(
|
|||
|
'filter' => 'uid=a*',
|
|||
|
'object_type' => 'LSeepeople',
|
|||
|
)
|
|||
|
);
|
|||
|
|
|||
|
// UniqueMember group
|
|||
|
$filter['uniqueMember']=array(
|
|||
|
array(
|
|||
|
'filter' => 'cn=admin*',
|
|||
|
'object_type' => 'LSeegroup',
|
|||
|
'attr' => 'uniqueMember',
|
|||
|
'basedn' => 'o=ost'
|
|||
|
),
|
|||
|
array(
|
|||
|
'basedn' => '%{dn}'
|
|||
|
)
|
|||
|
);
|
|||
|
|
|||
|
// memberUid
|
|||
|
$filter['memberUid']=array(
|
|||
|
array(
|
|||
|
'filter' => 'objectClass=posixGroup',
|
|||
|
'attr' => 'memberUid',
|
|||
|
'basedn' => 'o=ost'
|
|||
|
),
|
|||
|
array(
|
|||
|
'filter' => 'uid=%{dn}',
|
|||
|
)
|
|||
|
);
|
|||
|
|
|||
|
|
|||
|
/*
|
|||
|
- On liste les memberUid
|
|||
|
- on forme avec des DN et on recup<EFBFBD>re leur Groupe Principale
|
|||
|
- on recup<EFBFBD>re tout les membres de ces groupes
|
|||
|
- on ne garde que les ostpeople
|
|||
|
*/
|
|||
|
$filter['complexe']=array(
|
|||
|
array(
|
|||
|
'filter' => 'objectClass=posixGroup',
|
|||
|
'attr' => 'memberUid',
|
|||
|
'basedn' => 'o=ost'
|
|||
|
),
|
|||
|
array(
|
|||
|
'filter' => 'uid=%{dn}',
|
|||
|
'basedn' => 'uid=%{dn},ou=people,o=ost',
|
|||
|
'attr' => 'gidNumber',
|
|||
|
),
|
|||
|
array(
|
|||
|
'filter' => 'gidNumber=%{dn}',
|
|||
|
'object_type' => 'LSeegroup',
|
|||
|
'attr' => 'uniqueMember'
|
|||
|
),
|
|||
|
array(
|
|||
|
'basedn' => "%{dn}",
|
|||
|
)
|
|||
|
);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
foreach($eepeople -> listObjects($filter['complexe'],'o=ost') as $obj){
|
|||
|
echo "DN : ".$obj -> dn."\n<br />";
|
|||
|
$obj -> debug_printAttrsValues();
|
|||
|
}
|
|||
|
|
|||
|
?>
|