Skip to:
Content

bbPress.org

Ticket #3186: 3186.01.patch

File 3186.01.patch, 758 bytes (added by r-a-y, 4 years ago)
  • src/includes/common/functions.php

     
    610610 */
    611611function bbp_check_for_duplicate( $post_data = array() ) {
    612612
    613         // No duplicate checks for those who can throttle
    614         if ( current_user_can( 'throttle' ) ) {
    615                 return true;
    616         }
    617 
    618613        // Parse arguments against default values
    619614        $r = bbp_parse_args( $post_data, array(
    620615                'post_author'    => 0,
     
    625620                'anonymous_data' => array()
    626621        ), 'check_for_duplicate' );
    627622
     623        // No duplicate checks for those who can throttle
     624        if ( user_can( (int) $r['post_author'], 'throttle' ) ) {
     625                return true;
     626        }
     627
    628628        // Get the DB
    629629        $bbp_db = bbp_db();
    630630