Skip to:
Content

bbPress.org

Ticket #2393: template.php.patch

File template.php.patch, 854 bytes (added by alex-ye, 11 years ago)
  • includes/users/template.php

     
    15051505        ), 'user_can_view_forum' );
    15061506
    15071507        // Validate parsed values
    1508         $user_id  = bbp_get_user_id ( $r['user_id'], false, false );
     1508        $user_id  = bbp_get_user_id( $r['user_id'], false, false );
    15091509        $forum_id = bbp_get_forum_id( $r['forum_id'] );
    15101510        $retval   = false;
    15111511
    15121512        // User is a keymaster
    1513         if ( bbp_is_user_keymaster() ) {
     1513        if ( bbp_is_user_keymaster( $user_id ) ) {
    15141514                $retval = true;
    15151515
    15161516        // Forum is public, and user can read forums or is not logged in
    1517         } elseif ( bbp_is_forum_public ( $forum_id, $r['check_ancestors'] ) ) {
     1517        } elseif ( bbp_is_forum_public( $forum_id, $r['check_ancestors'] ) ) {
    15181518                $retval = true;
    15191519
    15201520        // Forum is private, and user can see it