Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#2956 closed defect (bug) (fixed)

Make delete_user action hook helpful

Reported by: filosofo Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: bg|has-patch delete_user
Focuses: Cc:


As I brought up here, the 'delete_user' hook is poorly placed, not allowing you to access usermeta data before a user is deleted. The attached patch moves it to a better place.

(For example, you might want to change post_meta data associated with a user's meta data, but by the time of the delete_user callback, all that user's meta data has been deleted.)

Matt suggested here that before moving the 'delete_user' hook, one should grep the plugins repository to see if anyone is using it in a plugin. I did, and only one plugin, Gengo, does, and it does in an apparently redundant way, as it attempts to delete usermeta files that have already been deleted.

So no plugins would be harmed by moving the 'delete_user' action hook.

Attachments (1)

admin-db.php.diff (514 bytes) - added by filosofo 12 years ago.

Download all attachments as: .zip

Change History (2)

#1 @ryan
12 years ago

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

(In [4020]) Relocate delete_user action. Props filosofo. fixes #2956

Note: See TracTickets for help on using tickets.