Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#2272 closed defect (bug) (fixed)

Members can't delete theirs account in wpmu

Reported by: francescolaffi Owned by: francescolaffi
Milestone: 1.2.4 Priority: normal
Severity: Version:
Component: Core Keywords: delete member account, wpmu_delete_user, has-patch, dev-feedback
Cc: francescolaffi

Description

problem described and solved in this forum post http://buddypress.org/forums/topic/cant-delete-user-account

sum: if a member try to delete his account it is redirected to the homepage and account is not deleted (wpmu only)

the problem is in the bp_core_delete_account function in bp-core.php:1700, this is part of that function:

	if ( bp_core_is_multisite() && function_exists('wpmu_delete_user') ) {
		require_once( ABSPATH . '/wp-admin/includes/mu.php' );
		require_once( ABSPATH . '/wp-admin/includes/user.php' );

		return wpmu_delete_user( $user_id );
	}

wpmu_delete_user is defined in /wp-admin/includes/mu.php that is required only after checkin if wpmu_delete_user exist. So if that file is not required somewhere else the if is always false.

Removing the function_exists condition from the if expr solve the problem for me. Diff attached

Attachments (1)

2272.diff (856 bytes) - added by francescolaffi 10 years ago.

Download all attachments as: .zip

Change History (3)

@francescolaffi
10 years ago

#1 @conschneider
10 years ago

Hi,

Confirmed. I am running wp mu 2.9.2 and buddypress 1.2.3. and had exactly the same problem. Your fix solved the problem in my case.

#2 @johnjamesjacoby
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2903]) Fixes #2272 and update phpdoc; props francescolaffi

Note: See TracTickets for help on using tickets.