Make delete_user action hook helpful
|Reported by:||filosofo||Owned by:|
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.