From b8a7c64301851173d9795e227aacd5bc9d405b3d Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 4 Nov 2019 14:13:23 -0700 Subject: [PATCH] * Admin: Fix some hooks got missed when deleting a user --- admin/inc/class.admin_cmd_delete_account.inc.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/admin/inc/class.admin_cmd_delete_account.inc.php b/admin/inc/class.admin_cmd_delete_account.inc.php index 6bda8dc6c0..6e192b29ae 100644 --- a/admin/inc/class.admin_cmd_delete_account.inc.php +++ b/admin/inc/class.admin_cmd_delete_account.inc.php @@ -200,16 +200,14 @@ class admin_cmd_delete_account extends admin_cmd ); // First do apps that were not selected $skip_apps = array(); - $do_last = array('preferences','admin'); - if($this->change_apps) + $do_last = array('preferences','admin','api'); + foreach(array_diff(array_keys($GLOBALS['egw_info']['apps']), array_merge($this->change_apps,$do_last)) as $app) { - foreach(array_diff(array_keys($GLOBALS['egw_info']['apps']), array_merge($this->change_apps,$do_last)) as $app) - { - $skip_apps[] = $app; - Api\Hooks::single(array_merge($GLOBALS['hook_values'], array('new_owner' => 0)), $app, true); - } + $skip_apps[] = $app; + Api\Hooks::single(array_merge($GLOBALS['hook_values'], array('new_owner' => 0)), $app, true); } - // first all other apps, then preferences and admin + + // first all other apps, then preferences, admin & api foreach(array_merge($this->change_apps,$do_last) as $app) { Api\Hooks::single($GLOBALS['hook_values'], $app, true);