Skip to:
Content

bbPress.org

Changeset 2819 for branches/plugin


Ignore:
Timestamp:
01/22/2011 06:35:59 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Stop XMLRPC from complaining when bbPress is activated. Remove needless isset() checks in bbp_get_user_id(). Fixes #1458

Location:
branches/plugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-user-template.php

    r2818 r2819  
    4343
    4444        // Currently viewing or editing a user
    45         elseif ( ( true == $displayed_user_fallback ) && !empty( $bbp->displayed_user->ID ) && isset( $bbp->displayed_user->ID ) )
     45        elseif ( ( true == $displayed_user_fallback ) && !empty( $bbp->displayed_user->ID ) )
    4646            $bbp_user_id = $bbp->displayed_user->ID;
    4747
    4848        // Maybe fallback on the current_user ID
    49         elseif ( ( true == $current_user_fallback ) && !empty( $bbp->current_user->ID ) && isset( $bbp->current_user->ID ) )
     49        elseif ( ( true == $current_user_fallback ) && !empty( $bbp->current_user->ID ) )
    5050            $bbp_user_id = $bbp->current_user->ID;
    5151
  • branches/plugin/bbpress.php

    r2818 r2819  
    701701     * Setup the currently logged-in user
    702702     *
     703     * Do not to call this prematurely, I.E. before the 'init' action has
     704     * started. This function is naturally hooked into 'init' to ensure proper
     705     * execution. get_currentuserinfo() is used to check for XMLRPC_REQUEST to
     706     * avoid xmlrpc errors.
     707     *
    703708     * @since bbPress (r2697)
    704709     *
     710     * @uses get_currentuserinfo()
    705711     * @global WP_User Current user object
    706712     */
     
    708714        global $current_user;
    709715
    710         // Load current user if somehow it hasn't been set yet
    711         // @todo Load current user somehow
    712716        if ( !isset( $current_user ) )
    713             wp_die( 'Loading the user too soon!' );
    714 
    715         // Set bbPress current user to WordPress current user
     717            $current_user = get_currentuserinfo();
     718
     719        // Set the current user in the bbPress global
    716720        $this->current_user = $current_user;
    717721    }
Note: See TracChangeset for help on using the changeset viewer.