auto subscription error
Quote from sgrusdew on December 16, 2019, 10:39 amHey 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 fileMaybe you can tell me how to get this done.
Thanks alot in advance,
Sergej
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
Quote from Asgaros on January 10, 2020, 5:05 pmHello @sgrusdew
Just remove the public keyword in front of the function and it should work correctly. 🙂
Hello @sgrusdew
Just remove the public keyword in front of the function and it should work correctly. 🙂