Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1493 closed defect (bug) (fixed)

User's links aren't deleted if they've got no posts when deleting a user [PATCH]

Reported by: davidhouse's profile davidhouse Owned by: skippy's profile skippy
Milestone: Priority: normal
Severity: normal Version: 1.6
Component: Administration Keywords: user links bg|has-patch bg|commit
Focuses: Cc:

Description

In the function wp_delete_user() in wp-admin/admin-functions.php, an if () statement surrounds a bunch of queries. This is done to ensure those queries aren't executed if the user doesn't have any posts. This makes sense, but the query to delete a user's links is inside that check, too. A user may have links but no posts, and so this could lead to orphaned links.

Patch attached.

Attachments (1)

diff (642 bytes) - added by davidhouse 19 years ago.

Download all attachments as: .zip

Change History (5)

@davidhouse
19 years ago

#1 @skippy
19 years ago

  • Keywords bg|has-patch bg|dev-feedback added
  • Owner changed from anonymous to skippy
  • Status changed from new to assigned

#2 @markjaquith
19 years ago

  • Keywords bg|commit added; bg|dev-feedback removed
  • Milestone set to 1.6

This looks good to me. I'm passing it along for commit.

#3 @matt
19 years ago

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

Looks like already fixed.

#4 @(none)
18 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.