X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/98907514962d51214461614c73087dc9f0f6c2f7..e14559f16ec474f993208fde7c9065c2aa3d385a:/WEB-INF/lib/auth/Auth_ldap.class.php diff --git a/WEB-INF/lib/auth/Auth_ldap.class.php b/WEB-INF/lib/auth/Auth_ldap.class.php index 25d375bc..b3f5d52a 100644 --- a/WEB-INF/lib/auth/Auth_ldap.class.php +++ b/WEB-INF/lib/auth/Auth_ldap.class.php @@ -78,6 +78,13 @@ class Auth_ldap extends Auth { */ function authenticate($login, $password) { + // Special handling for admin@localhost - authenticate against db, not ldap. + // It is a fallback mechanism when admin account in LDAP directory does not exist or is misconfigured. + if ($login == 'admin@localhost') { + import('auth.Auth_db'); + return Auth_db::authenticate($login, $password); + } + if (!function_exists('ldap_bind')) { die ('php_ldap extension not loaded!'); }