note 32187 approved from function.ldap-add by alindeman
| From: | alindeman@php.net | Date: | Tue, 20 May 2003 01:37:14 +0000 |
| Subject: | note 32187 approved from function.ldap-add by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48632@lists.php.net to get a copy of this message | ||
This note has been approved and will appear in the manual
----
In response to jharnett's question about accounts disabled by default from ldap_add, we have
found a solution.
The attribute userAccountControl contains a value that includes whether the account is disabled or
enabled. The default for us is 546; when we changed that to 544 the account became enabled. Changing
whatever value is in userAccountControl by 2 seems to enable or disable the account.
The following code worked for us to create a new user with an enabled account:
$adduserAD["userAccountControl"] = "544";
We just added this element to the above example's array.