Skip to:
Content

BuddyPress.org

Changeset 5295


Ignore:
Timestamp:
11/07/2011 10:55:48 AM (8 years ago)
Author:
djpaul
Message:

Fix admin bar not showing for logged-out users. See #3661

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-buddybar.php

    r5126 r5295  
    568568
    569569    // Don't show if admin bar is disabled for non-logged in users
    570     if ( (int) bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )
     570    if ( (int) bp_get_option( 'hide-loggedout-adminbar' ) )
    571571        return;
    572572
     
    574574    if ( bp_use_wp_admin_bar() && $wp_version >= 3.1 ) {
    575575        // Respect user's admin bar display preferences
    576         if ( bp_get_admin_bar_pref( 'front', bp_loggedin_user_id() ) || bp_get_admin_bar_pref( 'admin', bp_loggedin_user_id() ) )
     576        if ( is_user_logged_in() && ( bp_get_admin_bar_pref( 'front', bp_loggedin_user_id() ) || bp_get_admin_bar_pref( 'admin', bp_loggedin_user_id() ) ) )
    577577            return;
    578578
Note: See TracChangeset for help on using the changeset viewer.