note 70079 added to function.ldap-add
| From: | erwann at zeflip dot com | Date: | Mon, 02 Oct 2006 16:20:49 +0000 |
| Subject: | note 70079 added to function.ldap-add | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117945@lists.php.net to get a copy of this message | ||
I was looking at creating a user in Active Directory, and it kept erroring with "Object Class
Violation".
I then realised looking at an existing record that all the attributes had to be arrays:
<?
$info["cn"]= array("John Jones");
$info["sn"]=array("Jones");
$info["mail"]=array("jonj@example.com");
$info["objectclass"]=array("person");
// add data to directory
$r=ldap_add($ds, "cn=John Jones, o=My Company, c=US", $info);
?>
----
Server IP: 217.174.203.10
Probable Submitter: 81.56.220.187
----
Manual Page -- http://www.php.net/manual/en/function.ldap-add.php
Edit -- https://master.php.net/note/edit/70079
Del: integrated -- https://master.php.net/note/delete/70079/integrated
Del: useless -- https://master.php.net/note/delete/70079/useless
Del: bad code -- https://master.php.net/note/delete/70079/bad+code
Del: spam -- https://master.php.net/note/delete/70079/spam
Del: non-english -- https://master.php.net/note/delete/70079/non-english
Del: in docs -- https://master.php.net/note/delete/70079/in+docs
Del: other reasons-- https://master.php.net/note/delete/70079
Reject -- https://master.php.net/note/reject/70079
Search -- https://master.php.net/manage/user-notes.php