Notifications
Quote from karine0908 on September 2, 2025, 9:18 amHello,
I used this code :
$users = get_users();foreach ($users as $user) {update_user_meta($user->ID, ’asgarosforum_subscription_global_posts’, 1);delete_user_meta($user->ID, ’asgarosforum_subscription_global_topics’);But now I have too many users with the notifications activated.Is it possible to remove the notifications for all of them and just put the notifications for the users in one group ?Thank you for your helpKarine.
Hello,
I used this code :
Quote from relievedfence on September 24, 2025, 9:41 amQuote from karine0908 on September 2, 2025, 9:18 amHello,
I used this code :
$users = get_users();foreach ($users as $user) {update_user_meta($user->ID, ’asgarosforum_subscription_global_posts’, 1);delete_user_meta($user->ID, ’asgarosforum_subscription_global_topics’);But now I have too many users with the notifications activated.Is it possible to remove the notifications for all of them and just put the notifications for the users in one group ?Thank you for your helpKarine.
You need to delete the `asgarosforum_subscription_global_posts` user meta for all users, then add it back only for members of the specific group you want to notify.
– Delete notifications for all users:
$users = get_users();
foreach ($users as $user) {
delete_user_meta($user->ID, ‘asgarosforum_subscription_global_posts’);
}– Re-enable Notifications for a Specific User Group:
$users_in_group = get_users(array(‘role’ => ‘your_user_group_name’));
foreach ($users_in_group as $user) {
update_user_meta($user->ID, ‘asgarosforum_subscription_global_posts’, 1);
}
Quote from karine0908 on September 2, 2025, 9:18 amHello,
I used this code :
$users = get_users();foreach ($users as $user) {update_user_meta($user->ID, ’asgarosforum_subscription_global_posts’, 1);delete_user_meta($user->ID, ’asgarosforum_subscription_global_topics’);But now I have too many users with the notifications activated.Is it possible to remove the notifications for all of them and just put the notifications for the users in one group ?Thank you for your helpKarine.
You need to delete the `asgarosforum_subscription_global_posts` user meta for all users, then add it back only for members of the specific group you want to notify.
– Delete notifications for all users:
$users = get_users();
foreach ($users as $user) {
delete_user_meta($user->ID, ‘asgarosforum_subscription_global_posts’);
}
– Re-enable Notifications for a Specific User Group:
$users_in_group = get_users(array(‘role’ => ‘your_user_group_name’));
foreach ($users_in_group as $user) {
update_user_meta($user->ID, ‘asgarosforum_subscription_global_posts’, 1);
}