RE: System integration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx [mailto:dale@xxxxxxxxxxxxxxxxxxxxx] 
> Sent: Monday, February 13, 2006 11:34 PM
> To: php-windows@xxxxxxxxxxxxx
> Subject:  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
> 
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux