RE: [PHP-WIN] System integration
| From: | Matt Murphy | Date: | Tue, 14 Feb 2006 17:30:06 +0000 |
| Subject: | RE: [PHP-WIN] System integration | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-26704@lists.php.net to get a copy of this message | ||
The easiest way I've found, if you just want to verify their username &
password, you can do this:
$ds=ldap_connect("ldap://yourdc.yourdomain.com");
// Fix for Windows 2003 AD
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
if ($ds) {
$r=@ldap_bind($ds, $aduser, $adpass);
$adauth = "No"; // prevent insertion
// verify binding
if ($r) {
$adauth = "Yes";
} else {
$adauth = "No";
}
// end ad check
}
ldap_close($ds);
If you need groups and such, good luck.
Matt
> -----Original Message-----
> From: dale@kwikitsolutions.co.za [mailto:dale@kwikitsolutions.co.za]
> Sent: Monday, February 13, 2006 11:34 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] System integration
>
> Hi guys,
>
> Does anyone know or got an idea of how to access the user
> accounts of Active Directory using PHP?
>
> I need to integrate my intranet application's authentication
> with that of Active Directory.
>
> Any help or ideas will be greatly appreciated.
>
> Kind Regards,
> Dale
>
> --
> PHP Windows Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
>