Skip to:
Content

BuddyPress.org

Ticket #5575: 5575.02.patch

File 5575.02.patch, 1009 bytes (added by boonebgorges, 10 years ago)
  • bp-members/bp-members-functions.php

    diff --git bp-members/bp-members-functions.php bp-members/bp-members-functions.php
    index 96ecdb5..d96891c 100644
    function bp_core_delete_account( $user_id = 0 ) { 
    10871087        if ( empty( $user_id ) )
    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 ) )
    10961092                return false;
  • bp-settings/bp-settings-actions.php

    diff --git bp-settings/bp-settings-actions.php bp-settings/bp-settings-actions.php
    index d3e06f9..db290e2 100644
    function bp_settings_action_delete_account() { 
    333333                return;
    334334        }
    335335
     336        // Bail if account deletion is disabled
     337        if ( bp_disable_account_deletion() && ! bp_current_user_can( 'delete_users' ) ) {
     338                return false;
     339        }
     340
    336341        // Nonce check
    337342        check_admin_referer( 'delete-account' );
    338343