Skip to:
Content

BuddyPress.org

Opened 10 years ago

Last modified 10 years ago

#6156 new defect (bug)

bp_is_user_deleted() incorrectly checks user_status === 2

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by:
Milestone: Awaiting Contributions Priority: high
Severity: normal Version:
Component: Members Keywords: needs-patch needs-unit-tests
Cc:

Description

With our recent move to handling sign-ups the WordPress multisite way, we've taken over user_status "2" as meaning 'registered but not yet active' instead of 'you deleted your account but we kept your data for you.'

From what I can tell, when deleting a user, WordPress deletes the database entries completely for that user and their associated meta. Both wpmu_delete_user() and wp_delete_user() delete user data, and no where in WordPress core is the deleted column in the users table used.

I vaguely recall Andy and I discussing what user_status digit to use for "deleted" users and think we picked "2" based on a popular plugin at the time that basically allowed for deleting users by hiding them with a user_status of 2, so we secretly matched it to support that plugin.

Since bp_is_user_deleted() is only used in bp_is_user_active() and most of those usages should be bp_is_user_inactive() I think these functions need an audit and unit-tests to ensure they are doing what they should, and what we want them to.

Marking priority as high in 2.3, as future user_status improvements will rely on making sure these functions are hardened.

Change History (3)

#3 @DJPaul
10 years ago

  • Milestone changed from 2.3 to Future Release
Note: See TracTickets for help on using tickets.