mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 12:19:56 +09:00
ldap 모듈 인증을 위한 prefix 정보를 입력받도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5190 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2caa8b02ac
commit
4056eff5f6
8 changed files with 23 additions and 10 deletions
|
|
@ -31,8 +31,7 @@
|
|||
/**
|
||||
* @brief LDAP 연동하여 정보를 return하는 method
|
||||
**/
|
||||
function ldap_conn($user_id, $password, $ldap_userdn_suffix, $base_dn, $ldap_server, $ldap_port = 389) {
|
||||
|
||||
function ldap_conn($user_id, $password, $ldap_userdn_prefix, $ldap_userdn_suffix, $base_dn, $ldap_server, $ldap_port = 389) {
|
||||
if(!function_exists('ldap_connect')) return new Object(-1,'ldap module is not exists');
|
||||
|
||||
$ds = @ldap_connect($ldap_server, $ldap_port);
|
||||
|
|
@ -40,8 +39,7 @@
|
|||
|
||||
if(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) return new Object(-1,'fail to set option');
|
||||
|
||||
$userdn = $user_id.$ldap_userdn_suffix;
|
||||
|
||||
$userdn = $ldap_userdn_prefix.$user_id.$ldap_userdn_suffix;
|
||||
if(!@ldap_bind($ds, $userdn, $password)) return new Object(-1,'fail to bind');
|
||||
|
||||
$ldap_sr = @ldap_search($ds, $base_dn, '(cn='.$user_id.')', array ('*'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue