Lex Robinson
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [IP Based Login] The dropdown menu breaks our siteHi Brijesh,
That still crashes for us on the get_users call.
Also, we noticed that you’re only passing one argument to wp_login.
Could you change line 155 todo_action('wp_login', $username, $user);
please?Forum: Plugins
In reply to: [Virtual Moderator] Missing Argument 2 – error messageYou can use the following patch to fix this error:
--- a/wp-content/plugins/virtual-moderator/processor.php +++ b/wp-content/plugins/virtual-moderator/processor.php @@ -101,16 +101,7 @@ echo flagged(); echo flag(); if($user!=0){ -$wpdb->query( $wpdb->prepare( - "DELETE FROM ".$wpdb->prefix."vmdata - WHERE post_id='".$pid."' AND user_id='".$user."'") ); -}else{$wpdb->query( $wpdb->prepare( - " - DELETE FROM ".$wpdb->prefix."vmdata - WHERE post_id='".$pid."' AND ip='".$ip."'", - $pid, - $user, - $ip -) ); - +$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}vmdata WHERE post_id=%s AND user_id=%s", $pid, $user) ); +}else{ +$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}vmdata WHERE post_id=%s AND ip=%s", $pid, $ip ) ); };};}; --- a/wp-content/plugins/virtual-moderator/vmoderator.php +++ b/wp-content/plugins/virtual-moderator/vmoderator.php @@ -138,9 +138,7 @@ function on_publish($postid){ //if($culevel>=$vms['canUnflag']){ if(wp_get_current_user()->allcaps['level_'.$vms['canUnflag']]){ delete_post_meta($postid, '_flags'); - $wpdb->query( $wpdb->prepare( - "DELETE FROM ".$wpdb->prefix."vmdata - WHERE post_id='".$postid."'") ); + $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}vmdata WHERE post_id=%s", $postid ) ); }; } };
Viewing 2 replies - 1 through 2 (of 2 total)