Question about modifying notification settings for all existing users

Hello,

I would like to be able to change the activity notification settings for all registered users. Via the web interface, it is only possible to change the setting for users who will be added after the change (new users).
Is it possible to do this afterwards for users already registered, for example by directly modifying records in the database?

I guess my query is too specific for anyone to have looked into it yet.
In the meantime I saw that the table to be modified was _preferences and that rows of this type should be added for each user(or modified but by default the entries are non-existent, which should be equivalent to configvalue = 0)

image

I just have to find the right SQL command to create/update the needed rows for each user. If I do, I‘ll share it there, in case someone may need it.

1 Like

For all users that query would be:

UPDATE oc_preferences SET configvalue='0' 
WHERE configkey='notify_email_group_settings';

To only set it for a specific user you would add:

AND userid='USERID'

Make sure to make a backup of your database before trying it, just in case.

It might also be noteworthy that this line only seems to exist if users actively changed this setting before. If it hasn’t been changed by a user the default setting most probably applies to them as well.

You can check that by running:

select * from oc_preferences where configkey='notify_email_group_settings';
1 Like

Thanks for reply, unfortunately I don’t work in the same company anymore, so won’t be able to test your solution, but I’m sure it may be useful.