Re: Trying to run some code based on a field with there user id
@r-a-y This is what I came up with and the echo prints out this “Banned Users: Array” am I even close? lol
function my_bp_update_post_add_cppoints() {
global $bp;
$bpcpspam = array($bpcpspamlist);
$getspamlist = get_option( ‘bp_spammer_cp_bp’ );
$bpcpspamlist = explode(“,”, $getspamlist);
echo(‘Banned Users: ‘ . $bpcpspamlist . “
“);
if ($bp->loggedin_user->id != get_option( ‘bp_spammer_cp_bp’ ) ) {
foreach ($bpcpspam as $bpcpspamlist) {
if( function_exists(‘cp_alterPoints’) ){
cp_alterPoints($bp->loggedin_user->id, get_option(‘bp_update_post_add_cp_bp’) );
cp_log(‘Comment’, $bp->loggedin_user->id, get_option(‘bp_update_post_add_cp_bp’), BuddyPress);
}
}
}
}
add_action(‘bp_activity_posted_update’,’my_bp_update_post_add_cppoints’);