requireAuth(); if (!LDAP_ENABLED) { header('Location: index.php'); exit; } $ldap = new LDAPAuth(); $db = Database::getInstance(); $query = $_GET['q'] ?? ''; $users = []; if ($query) { $users = $ldap->searchUsers($query); } // Handle user import if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['import_users'])) { $selectedUsers = $_POST['users'] ?? []; foreach ($selectedUsers as $username) { $userInfo = $ldap->getUserInfo($username); if ($userInfo) { $auth->createLDAPUser($username, $userInfo); } } header('Location: ldap-users.php?imported=' . count($selectedUsers)); exit; } $user = $auth->getUser(); ?> LDAP Users - <?php echo SITE_TITLE; ?>

LDAP Directory Users

users imported successfully.
0): ?>
fetch("SELECT id FROM users WHERE username = ?", [$ldapUser['username']]); ?>
Username Name Email Actions
> Already Imported
Back to Dashboard

No users found matching ""

Enter a search query to find LDAP users available for import.