diff --git a/admin/inc/class.admin_account.inc.php b/admin/inc/class.admin_account.inc.php index bb746533a8..1020dd92a8 100644 --- a/admin/inc/class.admin_account.inc.php +++ b/admin/inc/class.admin_account.inc.php @@ -260,7 +260,7 @@ class admin_account } if ($content['delete']) { - $cmd = new admin_cmd_delete_account($content['account_id'], $content['new_owner'], true); + $cmd = new admin_cmd_delete_account($content['account_id'], $content['new_owner'], true, $content['admin_cmd']); $msg = $cmd->run(); if ($content['contact_id']) { diff --git a/admin/inc/class.admin_cmd_delete_account.inc.php b/admin/inc/class.admin_cmd_delete_account.inc.php index 162e8e7cfb..5bf54ea56b 100644 --- a/admin/inc/class.admin_cmd_delete_account.inc.php +++ b/admin/inc/class.admin_cmd_delete_account.inc.php @@ -23,8 +23,9 @@ class admin_cmd_delete_account extends admin_cmd * @param string|int|array $account account name or id, or array with all parameters * @param string $new_user =null if specified, account to transfer the data to (users only) * @param string $is_user =true type of the account: true=user, false=group + * @param array $extra =array() values for requested(_email), comment, ... */ - function __construct($account,$new_user=null,$is_user=true) + function __construct($account, $new_user=null, $is_user=true, array $extra=array()) { if (!is_array($account)) { @@ -32,7 +33,7 @@ class admin_cmd_delete_account extends admin_cmd 'account' => $account, 'new_user' => $new_user, 'is_user' => $is_user, - ); + )+$extra; } admin_cmd::__construct($account); } @@ -74,6 +75,9 @@ class admin_cmd_delete_account extends admin_cmd { Api\Hooks::single($GLOBALS['hook_values'],$app); } + // store old content at time of deletion + $this->old = $GLOBALS['egw']->accounts->read($account_id); + $GLOBALS['egw']->accounts->delete($account_id); if ($account_id < 0) diff --git a/admin/templates/default/account.delete.xet b/admin/templates/default/account.delete.xet index 5c7fd540a7..7f55580c52 100644 --- a/admin/templates/default/account.delete.xet +++ b/admin/templates/default/account.delete.xet @@ -2,17 +2,27 @@ -