X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fauth%2FAuth_ldap.class.php;h=5fb3dcf3d8f79c5a345659d2189fb632a907881b;hb=45ca7d2258832cb0d2465eb16dd646d925458106;hp=52d4fabe3dce3013810cbe9765fe330fb5a19538;hpb=75a1eedb8977b8f2db459128bab9aaf367e3b58b;p=timetracker.git diff --git a/WEB-INF/lib/auth/Auth_ldap.class.php b/WEB-INF/lib/auth/Auth_ldap.class.php index 52d4fabe..5fb3dcf3 100644 --- a/WEB-INF/lib/auth/Auth_ldap.class.php +++ b/WEB-INF/lib/auth/Auth_ldap.class.php @@ -96,7 +96,7 @@ class Auth_ldap extends Auth { $lc = ldap_connect($this->params['server']); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '
'; echo '$lc='; var_dump($lc); echo '
'; echo 'ldap_error()='; echo ldap_error($lc); echo '
'; @@ -106,7 +106,7 @@ class Auth_ldap extends Auth { ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($lc, LDAP_OPT_REFERRALS, 0); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { ldap_set_option($lc, LDAP_OPT_DEBUG_LEVEL, 7); } @@ -119,13 +119,13 @@ class Auth_ldap extends Auth { $login .= '@' . $this->params['default_domain']; } - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$login='; var_dump($login); echo '
'; } $lb = @ldap_bind($lc, $login, $password); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$lb='; var_dump($lb); echo '
'; echo 'ldap_error()='; echo ldap_error($lc); echo '
'; } @@ -142,7 +142,7 @@ class Auth_ldap extends Auth { $fields = array('memberof'); $sr = @ldap_search($lc, $this->params['base_dn'], $filter, $fields); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$sr='; var_dump($sr); echo '
'; echo 'ldap_error()='; echo ldap_error($lc); echo '
'; } @@ -154,7 +154,7 @@ class Auth_ldap extends Auth { $entries = @ldap_get_entries($lc, $sr); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$entries='; var_dump($entries); echo '
'; echo 'ldap_error()='; echo ldap_error($lc); echo '
'; } @@ -173,7 +173,7 @@ class Auth_ldap extends Auth { $groups[] = substr($grp_fields[0], 3); } - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$member_of'; var_dump($member_of); echo '
'; }; @@ -195,7 +195,7 @@ class Auth_ldap extends Auth { // Assuming OpenLDAP server. $login_oldap = 'uid='.$login.','.$this->params['base_dn']; - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$login_oldap='; var_dump($login_oldap); echo '
'; } @@ -207,7 +207,7 @@ class Auth_ldap extends Auth { $lb = @ldap_bind($lc, $login_oldap, $password); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$lb='; var_dump($lb); echo '
'; echo 'ldap_error()='; echo ldap_error($lc); echo '
'; } @@ -225,7 +225,7 @@ class Auth_ldap extends Auth { $fields = array('samaccountname', 'mail', 'memberof', 'department', 'displayname', 'telephonenumber', 'primarygroupid'); $sr = @ldap_search($lc, $this->params['base_dn'], $filter, $fields); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$sr='; var_dump($sr); echo '
'; echo 'ldap_error()='; echo ldap_error($lc); echo '
'; } @@ -238,7 +238,7 @@ class Auth_ldap extends Auth { $entries = @ldap_get_entries($lc, $sr); - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$entries='; var_dump($entries); echo '
'; echo 'ldap_error()='; echo ldap_error($lc); echo '
'; } @@ -258,7 +258,7 @@ class Auth_ldap extends Auth { $groups[] = substr($grp_fields[0], 3); } - if (isTrue('AUTH_DEBUG')) { + if (isTrue('DEBUG')) { echo '$member_of'; var_dump($member_of); echo '
'; }