Did you try this more than once?
I tried with only one UserNname in Forum Moderators property, and tried many times with other UserName and result is the same.
Did you ever figure out how to resolve this. I have the same issue.
the backend seems to only save one moderator.
This code should fix
add_action ('bbp_subscriptions_metabox' , 'rew_set_hidden_subscribers' ) ;
add_action ('bbp_topic_attributes_metabox_save' , 'rew_save_subscriptions', 10 , 2) ;
function rew_set_hidden_subscribers ($post) {
// Get user IDs
$user_ids = bbp_get_subscribers( $post->ID );
$list = implode(",",$user_ids);
// Output
?>
<input name="rew_topic_subscription" id="rew_topic_subscription" type="hidden" value="<?php echo $list; ?>" />
<?php
}
function rew_save_subscriptions ( $topic_id, $forum_id ) {
// Handle Subscriptions
if ( bbp_is_subscriptions_active() && ! empty( $_POST['rew_topic_subscription'] )) {
//update_option ($subscriptions)
$subscriptions = explode(",", $_POST['rew_topic_subscription']);
foreach ($subscriptions as $subscription_id ) {
// Check if subscribed and if so do nothing
if (bbp_is_user_subscribed( $subscription_id, $topic_id )) continue;
else {
bbp_add_user_subscription( $subscription_id, $topic_id );
}
}
}
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
or if you use
bbp style pack
this fix is automatically added
Thank you! The issue turned out to be I was entering the wrong username in the Forum Moderators textbox. I was using the WP Username (user_login field on users table) but when I used the encoded email address it excepted it. Eg. If the email was name@domain.com I needed to use name-domain-com.