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 ) { |
1087 | 1087 | if ( empty( $user_id ) ) |
1088 | 1088 | $user_id = bp_loggedin_user_id(); |
1089 | 1089 | |
1090 | | // Bail if account deletion is disabled |
1091 | | if ( bp_disable_account_deletion() ) |
1092 | | return false; |
1093 | | |
1094 | 1090 | // Site admins cannot be deleted |
1095 | 1091 | if ( is_super_admin( $user_id ) ) |
1096 | 1092 | return false; |
diff --git bp-settings/bp-settings-actions.php bp-settings/bp-settings-actions.php
index d3e06f9..db290e2 100644
|
|
function bp_settings_action_delete_account() { |
333 | 333 | return; |
334 | 334 | } |
335 | 335 | |
| 336 | // Bail if account deletion is disabled |
| 337 | if ( bp_disable_account_deletion() && ! bp_current_user_can( 'delete_users' ) ) { |
| 338 | return false; |
| 339 | } |
| 340 | |
336 | 341 | // Nonce check |
337 | 342 | check_admin_referer( 'delete-account' ); |
338 | 343 | |