Please or Register to create posts and topics.

Auto Subscription for all users

hello dear how are you, I hope you will be fine

I wanna know you may admin can set option for all user to Auto Subscription for all topics and post , so user do not have to

set it manually herself and himself.

 

Hello @nabeelpommy

Currently there is no option for this available because of legal reasons. In a couple of countries there are strict privacy rules which dont allow you as a site-owner to send mails to users without their agreement. If you really want to do this its on your own risk.

In this case I think the asgarosforum_subscriber_mails_new_topic filter is the way to go. With this filter you can modify the array containing the mails of users who should get notified about a new topic right before the mails are sent.

Here is an example code which you can add to your themes functions.php file:

function notify_about_new_topic_mails($mails) {
  $users = get_users();
  foreach ($users as $user) {
    if (!in_array($user->user_email, $mails)) {
            $mails[] = $user->user_email;
        }
  }
  
  return $mails;
}
add_filter('asgarosforum_subscriber_mails_new_topic', 'notify_about_new_topic_mails');

 

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!