#!/usr/bin/env php isEnabled()) { exit(0); // LDAP not enabled, nothing to do } echo "[" . date('Y-m-d H:i:s') . "] Starting LDAP user synchronization...\n"; $result = $ldap->syncUsers(); if ($result['success']) { echo "✓ Synchronization completed successfully:\n"; echo " - Total users in LDAP: {$result['total']}\n"; echo " - Synced (updated): {$result['synced']}\n"; echo " - Created: {$result['created']}\n"; echo " - Disabled: {$result['disabled']}\n"; } else { echo "✗ Synchronization failed: {$result['error']}\n"; exit(1); } } catch (Exception $e) { echo "✗ Error: " . $e->getMessage() . "\n"; exit(1); }