Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/26/2014 06:45:19 PM (11 years ago)
Author:
boonebgorges
Message:

Check bp_disable_account_deletion() setting in screen function rather than bp_core_delete_account() business function

The purpose of the disable-account-deletion setting is to prevent normal (ie
non-admin) BP users from deleting their own accounts through the front-end
interface. Locating the settings check in the business function
bp_core_delete_account() therefore caused problems when deleting accounts in
areas that were not meant to be covered by the setting, such as when accounts
are deleted in the Dashboard by an admin, or when the BP_Signup::delete()
method is called. This caused a particular problem in BP 2.0, because the
deletion of signups was no longer correctly cleaning up other data from the
database (xprofile, usermeta, etc).

Fixes #5575

File:
1 edited

Legend:

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

    r8318 r8324  
    10881088        $user_id = bp_loggedin_user_id();
    10891089
    1090     // Bail if account deletion is disabled
    1091     if ( bp_disable_account_deletion() )
    1092         return false;
    1093 
    10941090    // Site admins cannot be deleted
    10951091    if ( is_super_admin( $user_id ) )
Note: See TracChangeset for help on using the changeset viewer.