Ticket #2393: template.php.patch
File template.php.patch, 854 bytes (added by , 11 years ago) |
---|
-
includes/users/template.php
1505 1505 ), 'user_can_view_forum' ); 1506 1506 1507 1507 // Validate parsed values 1508 $user_id = bbp_get_user_id 1508 $user_id = bbp_get_user_id( $r['user_id'], false, false ); 1509 1509 $forum_id = bbp_get_forum_id( $r['forum_id'] ); 1510 1510 $retval = false; 1511 1511 1512 1512 // User is a keymaster 1513 if ( bbp_is_user_keymaster( ) ) {1513 if ( bbp_is_user_keymaster( $user_id ) ) { 1514 1514 $retval = true; 1515 1515 1516 1516 // Forum is public, and user can read forums or is not logged in 1517 } elseif ( bbp_is_forum_public 1517 } elseif ( bbp_is_forum_public( $forum_id, $r['check_ancestors'] ) ) { 1518 1518 $retval = true; 1519 1519 1520 1520 // Forum is private, and user can see it