NC 11 - Remove LDAP information in database

Sorry to hear you’re facing problems :slight_frown:

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the following as you can (you can cut and paste this into your topic):


Nextcloud version (eg, 10.0.2): 11.0.2
Operating system and version (eg, Ubuntu 16.04): Debian 8.6
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 5.6): Php 7.0.15
Is this the first time you’ve seen this error?:
Not an error. skip to “The issue you are facing”

Can you reliably replicate it? (If so, please outline steps):
Yes - just import the ldap users again
The issue you are facing:
Hello all,
i am importing some users via LDAP and its working like a charm.
Now i am getting the order to remove the e-mail notification for some users by removing the mail in the users section. Problem is that i am unable to do so because its filled by LDAP which is 100% correct.
I aleady removed the “import e-mail from ldap” option so ldap wont import the mail for new users but the existing ones still have it. How can i remove the already saved and cached mail from the database?

The output of your Nextcloud log in Admin > Logging:
Error PHP ldap_search(): Partial search results returned: Sizelimit exceeded at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#293

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

<?php $CONFIG = array ( 'instanceid' => 'ocmgn4ia6qoa', 'passwordsalt' => 'xxx', 'secret' => 'xxx', 'trusted_domains' => array ( 0 => 'xxx', ), 'datadirectory' => '/home/nextcloud', 'overwrite.cli.url' => 'xxx', 'dbtype' => 'mysql', 'version' => '11.0.2.7', 'dbname' => 'maxe_db', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'maxe', 'dbpassword' => 'xxx', 'logtimezone' => 'UTC', 'installed' => true, 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory', 'mail_from_address' => 'Cloud', 'mail_smtpmode' => 'smtp', 'mail_domain' => 'xxx', 'mail_smtphost' => 'xxx', 'mail_smtpport' => '25', 'knowledgebaseenabled' => false, 'session_keepalive' => true, 'skeletondirectory' => '/home/nextcloud/donttouch/', 'trashbin_retention_obligation' => 'D10, auto', 'versions_retention_obligation' => 'auto', 'ldapUserCleanupInterval' => 60, 'auth.bruteforce.protection.enabled' => true, 'log_rotate_size' => 52428800, 'filesystem_check_changes' => 1, 'loglevel' => 2, 'htaccess.RewriteBase' => '/', 'theme' => 'leifheit', 'enable_avatars' => true, 'maintenance' => false, 'updater.release.channel' => 'production', 'filelocking.enabled' => true, 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 0.0, ), ); The output of your Apache/nginx/system log in `/var/log/____`: --- Remember, this information may be requested if it isn't supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.

I think the “right” way to do this would be to have those users go into their accounts through the website, under Personal, Activity, and uncheck all notifications in the Mail column that they don’t want notifications for.
I would say the approach you’re attempting is the “wrong” way or at least unsupported way, but you could go into the database and remove those emails from the oc_preferences table, where appid=‘settings’ and configkey=‘email’

Hey linucksrox,

you’r totally right but some VIPs are very difficult to deal with.
The unsupported way some fine to me.

Thank you very much!

I understand. Glad I could help.