Ejemplo n.º 1
0
function bb_ksd_check_profile($user_id)
{
    global $bb_current_user, $user_obj;
    $bb_current_id = bb_get_current_user_info('id');
    bb_set_current_user($user_id);
    if ($bb_current_id && $bb_current_id != $user_id) {
        if ($user_obj->data->is_bozo && !$bb_current_user->data->is_bozo) {
            bb_ksd_submit($user_id, 'hammer');
        }
        if (!$user_obj->data->is_bozo && $bb_current_user->data->is_bozo) {
            bb_ksd_submit($user_id, 'spammer');
        }
    } else {
        $response = bb_ksd_submit($bb_current_user->data->occ . ' ' . $bb_current_user->data->interests);
        if ('true' == $response[1] && function_exists('bb_bozon')) {
            bb_bozon(bb_get_current_user_info('id'));
        }
    }
    bb_set_current_user((int) $bb_current_id);
}
Ejemplo n.º 2
0
function bb_ksd_pre_post_status($post_status)
{
    global $bb_current_user, $bb_ksd_pre_post_status, $bb_ksd_pre_post;
    // Don't filter content from users with a trusted role
    if (in_array($bb_current_user->roles[0], bb_trusted_roles())) {
        return $post_status;
    }
    $response = bb_ksd_submit($bb_ksd_pre_post);
    if ('true' == $response[1]) {
        $bb_ksd_pre_post_status = '2';
        return $bb_ksd_pre_post_status;
    }
    return $post_status;
}