From 7b8f27d76ce9f1d340c0fbf6aed0e303c8ae356a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 14 Mar 2018 14:21:36 +0100 Subject: [PATCH] hook to allow apps to migrate own config etc. in AD/LDAP account_id migration --- admin/inc/class.admin_cmd_change_account_id.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/admin/inc/class.admin_cmd_change_account_id.inc.php b/admin/inc/class.admin_cmd_change_account_id.inc.php index cec44bf1b9..fb643f4f0c 100644 --- a/admin/inc/class.admin_cmd_change_account_id.inc.php +++ b/admin/inc/class.admin_cmd_change_account_id.inc.php @@ -185,6 +185,15 @@ class admin_cmd_change_account_id extends admin_cmd $total += ($changed = Api\Framework\Favorites::change_account_ids($app, $this->change)); if ($changed) echo "$app:\t$changed id's in favorites or index-state changed\n"; } + + // call hooks, in case apps need additional changes + $args = $this->change; + $args['location'] = 'change_account_ids'; + foreach(Api\Hooks::process($args, array(), true) as $app => $changed) + { + $total += $changed; + if ($changed) echo "$app:\t$changed id's changed by application hook\n"; + } } if ($total) Api\Cache::flush(Api\Cache::INSTANCE);