svalavuo hace 6 días
padre
commit
9e19f65d8d
Se han modificado 2 ficheros con 3 adiciones y 6 borrados
  1. 3 0
      includes/auth.php
  2. 0 6
      includes/ldap.php

+ 3 - 0
includes/auth.php

@@ -4,6 +4,8 @@
  * Handles user login, logout, and session management
  */
 
+require_once 'database.php';
+
 class Auth {
     private $db;
     private $ldap;
@@ -11,6 +13,7 @@ class Auth {
     public function __construct() {
         $this->db = Database::getInstance();
         if (LDAP_ENABLED) {
+            require_once 'ldap.php';
             $this->ldap = new LDAPAuth();
         }
     }

+ 0 - 6
includes/ldap.php

@@ -209,9 +209,6 @@ class LDAPAuth {
                 $filter = "(&(objectclass=zimbraAccount))";
             }
             
-            // Debug: Log search parameters
-            error_log("LDAP Search Debug - Base DN: {$this->config['base_dn']}, Filter: $filter");
-            
             $search = ldap_search($this->connection, $this->config['base_dn'], $filter, [
                 'uid',
                 'cn',
@@ -227,9 +224,6 @@ class LDAPAuth {
             
             $entries = ldap_get_entries($this->connection, $search);
             
-            // Debug: Log search results count
-            error_log("LDAP Search Debug - Found {$entries['count']} entries");
-            
             $users = [];
             for ($i = 0; $i < $entries['count']; $i++) {
                 $user_entry = $entries[$i];