mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-23 02:19:07 +01:00
LSaddon::Posix : Added function generateMemberFromMemberUid()
This commit is contained in:
parent
4af5a767ed
commit
1d0c786bac
1 changed files with 23 additions and 0 deletions
|
@ -188,4 +188,27 @@ LSerror :: defineError('POSIX_01',
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function generateMemberFromMemberUid($ldapObject) {
|
||||||
|
if ( get_class($ldapObject -> attrs[ 'memberUid' ]) != 'LSattribute' ) {
|
||||||
|
LSerror :: addErrorCode('POSIX_01',array('dependency' => 'memberUid', 'attr' => 'member'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( get_class($ldapObject -> attrs[ 'member' ]) != 'LSattribute' ) {
|
||||||
|
LSerror :: addErrorCode('POSIX_01',array('dependency' => 'member', 'attr' => 'member'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$uids = $ldapObject -> attrs[ 'memberUid' ] -> getValue();
|
||||||
|
$member = array();
|
||||||
|
if (is_array($uids)) {
|
||||||
|
foreach ( $uids as $uid ) {
|
||||||
|
$member[]='uid='.$uid.','.LSconfig::get('LSobjets.LSehessPerson.container_dn').','.LSsession::getTopDn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $member;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue