Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1719 closed defect (bug) (fixed)

Action hook for user deletions?

Reported by: Fredster Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.6
Component: Administration Keywords: hooks
Focuses: Cc:


One of my plugins (Private Notes) maintains tables of notes and folders in the database on a per-user basis. When a registered user is deleted, there's no real way for my plugin to know that it's happened, so I had to hack out a function that's basically a "delete from the notes and folders tables where owners exist that don't also exist in the wpdb->users table."

It works, but it seems like it'd be smoother if there were a 'delete_user' hook, so I could just stick in an 'add_action' call and have the hook call my function, passing in the ID of the user being deleted.

This ticket is being entered at the request of MarkJaquith on #wordpress.

Change History (2)

#1 @markjaquith
10 years ago

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

Don't hate me... I went to go look into making a patch for this, and it's already in WP 1.6! :-)


do_action('delete_user', $id);


#2 @markjaquith
10 years ago

  • Version changed from 1.5.2 to 1.6
Note: See TracTickets for help on using tickets.