Forum breadcrumbs – You are here:Asgaros Support ForumSupportauto subscription error
Please or Register to create posts and topics.

auto subscription error

Hey there,

great plugin, thanks alot. We just have an issue regarding auto-subscription. And yes, we know about the problems when it comes to data-protection, our forum is just for internal use.

I wanted to add the following code (given in another topic) to the functions.php:

 

add_action(‘user_register’, array($this, ‘change_subscription_settings’), 10, 1);
public function change_subscription_settings($user_id) {
update_user_meta($user_id, ‘asgarosforum_subscription_global_posts’, 1);
delete_user_meta($user_id, ‘asgarosforum_subscription_global_topics’);
}

 

but then i get an error-message:

syntax error, unexpected 'public' (T_PUBLIC), expecting end of file

Maybe you can tell me how to get this done.

Thanks alot in advance,

Sergej

 

Hello @sgrusdew

Just remove the public keyword in front of the function and it should work correctly. 🙂

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