Opened 7 years ago
Closed 7 years ago
#2956 closed defect (bug) (fixed)
Make delete_user action hook helpful
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Administration | Version: | 2.1 |
| Severity: | normal | Keywords: | bg|has-patch delete_user |
| Cc: |
Description
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.
(In [4020]) Relocate delete_user action. Props filosofo. fixes #2956