Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 01:14:31 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Use bp_displayed_user_id() rather than reference the $bp->displayed_user->id global var directly. First step at consolidating user ID checks to use WP_User class later. See #3738.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-actions.php

    r4961 r5301  
    123123    global $bp;
    124124
    125     if ( !is_super_admin() || bp_is_my_profile() || !$bp->displayed_user->id )
     125    if ( !is_super_admin() || bp_is_my_profile() || !bp_displayed_user_id() )
    126126        return false;
    127127
     
    133133        do_action( 'bp_core_before_action_delete_user', $errors );
    134134
    135         if ( bp_core_delete_account( $bp->displayed_user->id ) ) {
     135        if ( bp_core_delete_account( bp_displayed_user_id() ) ) {
    136136            bp_core_add_message( sprintf( __( '%s has been deleted from the system.', 'buddypress' ), $bp->displayed_user->fullname ) );
    137137        } else {
Note: See TracChangeset for help on using the changeset viewer.