get_results("SELECT ID from $wpdb->users ORDER BY display_name");
$author_list = array();
foreach ($authors as $a) {
$author_list[] = $a->ID;
}
foreach ($author_list as $a) {
update_usermeta($a, "favorite_notification", 1);
print ("Subscribing user #" . $a . " to groups: ");
if ( bp_has_groups(array('user_id' => $a, 'per_page' => 100 )) ) {
while ( bp_groups() ) : bp_the_group();
$g = bp_get_group_id();
gfs_groups_action_join_group_subscribe( $a, $g );
print ($g);
print (" ");
endwhile;
}
print "
";
}
print "Finished";
}
if( $_POST[ 'gfs_update' ] == '1' ) {
$opt_val = $_POST[ 'automatic-forum-subscription-default' ];
$opt_val_2 = $_POST[ 'gfs-sender-email' ];
update_option( 'automatic-forum-subscription-default', $opt_val );
update_option( 'gfs-sender-email', $opt_val_2 );
?>