mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +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];
|
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)))
|
if (!($data['account_id'] = admin_cmd::$accounts->save($data)))
|
||||||
{
|
{
|
||||||
//_debug_array($data);
|
//_debug_array($data);
|
||||||
throw new Api\Db\Exception(lang("Error saving account!"),11);
|
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
|
// set deprecated name
|
||||||
$data['account_name'] = $data['account_lid'] = $data['account_lid'] ?
|
$data['account_name'] = $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
|
if ($update) $data['old_name'] = $old['account_lid']; // make old name available for hooks
|
||||||
$GLOBALS['hook_values'] =& $data;
|
$GLOBALS['hook_values'] =& $data;
|
||||||
|
Loading…
Reference in New Issue
Block a user