From 5a7c65d0f76a24b811686f334faf17f2ff48f87c Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 22 Aug 2018 09:53:54 -0600 Subject: [PATCH] Make sure account_lid is there for hooks, even if not passed in --- admin/inc/class.admin_cmd_edit_group.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/inc/class.admin_cmd_edit_group.inc.php b/admin/inc/class.admin_cmd_edit_group.inc.php index 747de47c2d..4465efae9f 100644 --- a/admin/inc/class.admin_cmd_edit_group.inc.php +++ b/admin/inc/class.admin_cmd_edit_group.inc.php @@ -99,7 +99,11 @@ class admin_cmd_edit_group extends admin_cmd //_debug_array($data); throw new Api\Db\Exception(lang("Error saving account!"),11); } - $data['account_name'] = $data['account_lid']; // also set deprecated name + // Make sure we have lid for hook even if not changed, also set deprecated name + $data['account_name'] = $data['account_lid'] = $data['account_lid'] ? + $data['account_lid'] : + admin_cmd::$accounts->id2name($data['account_id']); + if ($update) $data['old_name'] = $old['account_lid']; // make old name available for hooks $GLOBALS['hook_values'] =& $data; Api\Hooks::process($GLOBALS['hook_values']+array(