Error when trying to list disabled users, possibly because of remnants ldap users

Nextcloud version : 28.0.4
Operating system and version : docker:28-apache

The issue you are facing:

If I go in the “Disabled users” section with my administration account, I get an error message “An error occurred during the request. Unable to proceed.” and the page remains blank. The “Active users” and “Admins” sections work fine.

I suspect this might be caused by a remnant ldap installation. I previously (foolishly) connected an ldap server that I later removed because there where issues with the authentication. Now I’m using regular accounts and some time ago I disabled the remnant ldap users because there were not useful, that I could not remove, but since the last update I cannot access the disabled users page.

The command occ user:list --info only shows regular accounts, no ldap accounts, and also shows regular disabled accounts. The command occ ldap:show-remnants shows no output.

I’ve had a look at the database (without doing any modification), the ldap users do not show in the table oc_users, but they do show in oc_accounts. Also they shows as disabled in oc_preferences, in entries with the key core and status enabled=false.

I would also like to completely remove any trace of the ldap configuration.

Is this the first time you’ve seen this error? : it happeared since upgrading to Nextcloud 28. Previously the ldap accounts appeared as disabled.

Steps to replicate it:

  1. Open “Disabled users” section from an admin account

The output of your config.php file :

$CONFIG = array (
  'allow_local_remote_servers' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'trashbin_retention_obligation' => 'auto, 90',
  'instanceid' => '***',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' => 
  array (
    0 => '***',
  ),
  'trusted_proxies' => 
  array (
    0 => '***,
  ),
  'dbtype' => 'mysql',
  'datadirectory' => '/var/www/html/data',
  'version' => '28.0.4.1',
  'htaccess.RewriteBase' => '/',
  'overwrite.cli.url' => '***',
  'overwritehost' => '***',
  'overwriteprotocol' => 'https',
  'dbname' => '***',
  'dbhost' => '***',
  'dbport' => '***',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '***',
  'dbpassword' => '***',
  'installed' => true,
  'maintenance' => false,
  'twofactor_enforced' => 'true',
  'ldapIgnoreNamingRules' => false,
  'theme' => '',
  'loglevel' => '1',
  'default_phone_region' => 'IT',
  'mail_from_address' => '***',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '***',
  'mail_smtpauthtype' => '***',
  'mail_smtphost' => '***',
  'mail_smtpport' => '***',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '***',
  'mail_smtppassword' => '***',
  'maintenance_window_start' => 2,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
);