mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
Make sure we have lid for hook even if not changed, some backend require it
This commit is contained in:
parent
a32c99154c
commit
45a62a3b5d
@ -94,15 +94,18 @@ class admin_cmd_edit_group extends admin_cmd
|
||||
if (is_null($value)) $value = $old[$name];
|
||||
}
|
||||
}
|
||||
// Make sure we have lid for hook even if not changed, some backend require it
|
||||
if (empty($data['account_lid']))
|
||||
{
|
||||
$data['account_lid'] = admin_cmd::$accounts->id2name($data['account_id']);
|
||||
}
|
||||
if (!($data['account_id'] = admin_cmd::$accounts->save($data)))
|
||||
{
|
||||
//_debug_array($data);
|
||||
throw new Api\Db\Exception(lang("Error saving account!"),11);
|
||||
}
|
||||
// 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']);
|
||||
// set deprecated name
|
||||
$data['account_name'] = $data['account_lid'];
|
||||
|
||||
if ($update) $data['old_name'] = $old['account_lid']; // make old name available for hooks
|
||||
$GLOBALS['hook_values'] =& $data;
|
||||
|
Loading…
Reference in New Issue
Block a user