Lost my users after upgrading to 24.07

Nextcloud version (eg, 20.0.5): 24.0.7
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.54
PHP version (eg, 7.4): 7.4

The issue you are facing:
I have just run the upgrade from 24.06 to 24.07 via web interface and cmd line.
After the update I was unable to login with my normal account which is LDAP authenticated
Tried logging in with the local admin account and was unable to login until I did a password reset.
Checking the users page throws an error and returns no users

If I go into the LDAP/AD Integration and test the LDAP settings, everything passes and I can validate a user by login or email address

Users LDAP filter
&(|(objectclass=user))(|(|(memberof=CN=cloud-access,,DC=local)(primaryGroupID=))))

Login Attributes
LDAP/AD Username (yes)
LDAP/AD Email Address (yes)
(&(&(|(objectclass=user))(|(|(memberof=CN=cloud-access,,DC=local)(primaryGroupID=))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))))

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Run the upgrade
  2. Try login after the upgrade

The output of your Nextcloud log in Admin > Logging:

[user_ldap] Warning: LDAP Login: Could not get user object for DN ***. Maybe the LDAP entry has no set display name attribute?

GET /csrftoken
from **** by **** at 2022-11-05T08:17:14+00:00
[core] Error: Error: Object of class OC\User\User could not be converted to string at <<closure>>

0. /cloud/next/lib/private/Log.php line 402
   strtr()
1. /cloud/next/lib/private/Log.php line 323
   OC\Log->interpolateMessage()
2. /cloud/next/lib/private/AppFramework/Logger.php line 125
   OC\Log->logException()
3. /cloud/next/apps/activity/lib/MailQueueHandler.php line 420
   OC\AppFramework\Logger->logException()
4. /cloud/next/apps/activity/lib/MailQueueHandler.php line 165
   OCA\Activity\MailQueueHandler->sendEmailToUser()
5. /cloud/next/apps/activity/lib/BackgroundJob/EmailNotification.php line 61
   OCA\Activity\MailQueueHandler->sendEmails()
6. /cloud/next/lib/private/BackgroundJob/Job.php line 54
   OCA\Activity\BackgroundJob\EmailNotification->run()
7. /cloud/next/lib/private/BackgroundJob/TimedJob.php line 60
   OC\BackgroundJob\Job->execute()
8. /cloud/next/cron.php line 151
   OC\BackgroundJob\TimedJob->execute()

at 2022-11-05T08:15:08+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '****',
  'passwordsalt' => '****',
  'secret' => '****',
  'trusted_domains' => 
  array (
    0 => '****',
  ),
  'datadirectory' => '/cloud/next/data',
  'dbtype' => 'mysql',
  'version' => '24.0.7.1',
  'overwrite.cli.url' => 'https://****.com',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'next',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '****',
  'dbpassword' => '****',
  'installed' => true,
  'maintenance' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '****',
  'mail_smtphost' => '****',
  'mail_smtpport' => '587',
  'theme' => '',
  'loglevel' => 2,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'skeletondirectory' => '',
  'default_phone_region' => '**',
  'updater.release.channel' => 'stable',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '****',
  'mail_smtppassword' => '****',
  'updater.secret' => '****',
);

The output of your Apache/nginx/system log in /var/log/____:

[Sat Nov 05 10:53:20.564338 2022] [core:notice] [pid 780] AH00094: Command line: '/usr/sbin/apache2'
[Sat Nov 05 11:05:18.529643 2022] [access_compat:error] [pid 6109] [client 176.202.49.18:1488] AH01797: client denied by server configuration: /cloud/next/data/.ocdata
[Sat Nov 05 11:21:47.636823 2022] [access_compat:error] [pid 5970] [client 176.202.49.18:47749] AH01797: client denied by server configuration: /cloud/next/data/.ocdata

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE