note 113627 added to function.ldap-mod-del

From: Date: Thu, 07 Nov 2013 15:27:38 +0000
Subject: note 113627 added to function.ldap-mod-del
Groups: php.notes 
Request: Send a blank email to php-notes+get-197453@lists.php.net to get a copy of this message
Te remove a user from a group in Apple's Open Directory, you need to also remove the members generated uid from the group. Removing the users is as follows: <?php //setting variables $ldapDN = "uid=myadmin,cn=users,dc=myserver,dc=com'; $ldapPass = "somepass"; $groupDn = 'cn=mygroup,cn=groups,dc=myserver,dc=com' $removal = array( "memberuid"=>"username", "apple-group-memberguid"=>"846DE847-D73D-428D-83A8-B95B606C511B" ); //connect and bind $ldapconnect = ldap_connect("myserver.com",389); ldap_bind($ldapconnect, $ldapDN, $ldapPass); //removing member from group ldap_mod_del($ldapconnect, $groupDn, $removal); //unbind ldap_unbind($ldapconnect); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/function.ldap-mod-del.php Edit -- https://master.php.net/note/edit/113627 Del: integrated -- https://master.php.net/note/delete/113627/integrated Del: useless -- https://master.php.net/note/delete/113627/useless Del: bad code -- https://master.php.net/note/delete/113627/bad+code Del: spam -- https://master.php.net/note/delete/113627/spam Del: non-english -- https://master.php.net/note/delete/113627/non-english Del: in docs -- https://master.php.net/note/delete/113627/in+docs Del: other reasons-- https://master.php.net/note/delete/113627 Reject -- https://master.php.net/note/reject/113627 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197453) next »