Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Can you make a role to subscribe a forum?

@robin-w

Moderator

the update_option bit stops it being run more than once.

so to run it a 2nd time use

$list = get_users();
if (empty (get_option ('rew_done2')) {
	foreach ($list as $user) {
		$user_id = $user->ID ;
		$forum_id = 3 ;
		bbp_add_user_forum_subscription( $user_id, $forum_id ) ;
	}
	update_option ('rew_done2' , 'done2' ) ;
}
Skip to toolbar