#352 about ldap authen config

open
nobody
None
1
2013-05-30
2013-05-30
Anonymous
No

how i put this data into config.php.inc

$ldaprdn = "mail=".$user."@aaa.bbb.ccc.dddd,ou=Users,domainName=aaa.bbb.ccc.ddd,o=domains,dc=aaa,dc=bbb,dc=ccc,dc=ddd";
$ldapconn = ldap_connect("eee.fff.ggg.hhh.iii",$port) or die("Could not connect to LDAP server.");
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);

            if ($ldapconn) 
            {
                if (@ldap_bind($ldapconn, $ldaprdn, $pass))
                { $status_authen = "Y";}
                else
                { $status_authen = "N";}        
            }
            ldap_close($ldapconn);

im sorry i dont know anything about ldap
thank you sir

Discussion


Anonymous

Cancel  Add attachments