diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php index 12256fe..51237d7 100644 --- a/core/modules/user/user.api.php +++ b/core/modules/user/user.api.php @@ -81,7 +81,8 @@ function hook_user_delete($account) { * Modules may add further methods via hook_user_cancel_methods_alter(). * * This hook is NOT invoked for the 'user_cancel_delete' account cancellation - * method. To react on this method, implement hook_user_delete() instead. + * method. To react to that method, implement hook_user_predelete() or + * hook_user_delete() instead. * * Expensive operations should be added to the global account cancellation batch * by using batch_set(). diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 1a08669..a7f772e 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -2356,7 +2356,9 @@ function user_cancel($edit, $uid, $method) { ); batch_set($batch); - // Modules use hook_user_delete() to respond to deletion. + // When the 'user_cancel_delete' method is used, user_delete() is called, + // which invokes hook_user_predelete() and hook_user_delete(). Modules + // should use those hooks to respond to the account deletion. if ($method != 'user_cancel_delete') { // Allow modules to add further sets to this batch. module_invoke_all('user_cancel', $edit, $account, $method);