note 54821 added to function.ldap-mod-add
| From: | theiderichATlaweeklydotcom at osu1 dot php dot net | Date: | Fri, 15 Jul 2005 22:17:46 +0000 |
| Subject: | note 54821 added to function.ldap-mod-add | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92043@lists.php.net to get a copy of this message | ||
When adding/editing attributes for a user, the 'memberof' attribute is a special case.
The memberOf attribute is not an accessible attribute of the user schema. To add someone to a group,
you have to add the user in the group, and not the group in the user. You can do this by accessing
the group attribute 'member':
<?php
$group_name = "CN=MyGroup,OU=Groups,DC=example,DC=com";
$group_info['member'] = $dn; // User's DN is added to group's 'member'
array
ldap_mod_add($connect,$group_name,$group_info);
?>
----
Manual Page -- http://www.php.net/manual/en/function.ldap-mod-add.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54821
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54821&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54821&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54821&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54821&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54821&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54821&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54821&report=yes
Search -- http://master.php.net/manage/user-notes.php