note 88822 added to function.ldap-bind
| From: | taomanjay at _DIESPAM_gmail dot com | Date: | Mon, 09 Feb 2009 22:36:03 +0000 |
| Subject: | note 88822 added to function.ldap-bind | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150429@lists.php.net to get a copy of this message | ||
Just a quick and easy function to authenticate against an AD domain controller:
<?
function ad_auth( $server, $username, $password ){
$ldap = @ldap_connect( $server );
if ( @ldap_bind( $ldap, $username, $password ) ){
ldap_unbind( $ldap );
return 1;
}
else{
return 0;
}
}
?>
----
Server IP: 209.41.74.194
Probable Submitter: 140.239.198.66
----
Manual Page -- http://www.php.net/manual/en/function.ldap-bind.php
Edit -- https://master.php.net/note/edit/88822
Del: integrated -- https://master.php.net/note/delete/88822/integrated
Del: useless -- https://master.php.net/note/delete/88822/useless
Del: bad code -- https://master.php.net/note/delete/88822/bad+code
Del: spam -- https://master.php.net/note/delete/88822/spam
Del: non-english -- https://master.php.net/note/delete/88822/non-english
Del: in docs -- https://master.php.net/note/delete/88822/in+docs
Del: other reasons-- https://master.php.net/note/delete/88822
Reject -- https://master.php.net/note/reject/88822
Search -- https://master.php.net/manage/user-notes.php