Ticket #2590: 2590.3.diff
| File 2590.3.diff, 2.1 KB (added by , 9 years ago) |
|---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-topic-resolution/inc/class-plugin.php
505 505 $post = get_post( $topic_id ); 506 506 } 507 507 508 if ( $user_id && $post && ( user_can( $user_id, 'moderate' ) || $user_id == $post->post_author ) ) {508 if ( $user_id && $post && ( user_can( $user_id, 'moderate', $topic_id ) || $user_id == $post->post_author ) ) { 509 509 $retval = true; 510 510 } else { 511 511 $retval = false; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php
386 386 * of badging them. Use the $strict argument to check that the user is a 387 387 * moderator without considering if they are a keymaster. 388 388 * 389 * @param string $user_id Optional. User ID. Assumes current replyauthor ID389 * @param string $user_id Optional. User ID. Assumes current post author ID 390 390 * if not provided. 391 391 * @param bool $strict Optional. True if user should strictly be checked 392 392 * for being a moderator, false will also check if they … … 395 395 */ 396 396 public function is_user_moderator( $user_id = '', $strict = false ) { 397 397 if ( ! $user_id ) { 398 $user_id = bbp_get_reply_author_id();398 $user_id = get_post_field( 'post_author' ); 399 399 } 400 400 401 return ( user_can( $user_id, 'moderate' ) || ( ! $strict && bbp_is_user_keymaster( $user_id ) ) );401 return ( user_can( $user_id, 'moderate', get_the_ID() ) || ( ! $strict && bbp_is_user_keymaster( $user_id ) ) ); 402 402 } 403 403 }