dirroot.'/course/lib.php'); // Ensure errors are well explained $CFG->debug = DEBUG_NORMAL; if (!is_enabled_auth('ldap')) { error_log('[AUTH LDAP] '.get_string('pluginnotenabled', 'auth_ldap')); die; } $ldapauth = get_auth_plugin('ldap'); $ldapauth->sync_users(true);