Skip to:
Content

BuddyPress.org

Changeset 5592


Ignore:
Timestamp:
12/23/2011 09:50:20 PM (10 years ago)
Author:
boonebgorges
Message:

Ensure that bp->loggedin_user->id has a fallback value, for when the current_user global is not available, such as during XML-RPC requests.
Fixes #3873.
Props lancehudson for the initial patch

File:
1 edited

Legend:

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

    r5524 r5592  
    168168
    169169        // The user ID of the user who is currently logged in.
    170         $bp->loggedin_user->id   = $current_user->ID;
     170        $bp->loggedin_user->id   = isset( $current_user->ID ) ? $current_user->ID : 0;
    171171
    172172        /** Avatars ***********************************************************/
Note: See TracChangeset for help on using the changeset viewer.