Support » Plugin: Rockhoist Badges » [Plugin: Rockhoist Badges] rhb_user_has_badge() error (and fix)

  • hi!

    rhb_user_has_badge() function has an error in SQL.

    Just change (rh-badges.php:481)

    $badge_count = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . "rh_user_badges WHERE badge_id = %d AND user_id = $d;", $args['badge_ID'], $args['user_ID']));

    to

    $badge_count = $wpdb->get_var($wpdb->prepare('SELECT COUNT(*) FROM ' . $wpdb->prefix . "rh_user_badges WHERE badge_id = %d AND user_id = %d;", $args['badge_ID'], $args['user_ID']));

    http://wordpress.org/extend/plugins/rockhoist-badges/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Rockhoist Badges] rhb_user_has_badge() error (and fix)’ is closed to new replies.