mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 13:39:23 +01:00
Fix some account changes were not saved
This commit is contained in:
parent
6c9504e647
commit
7631eb83aa
@ -641,17 +641,20 @@ class Accounts
|
|||||||
$old['account_lastname'] != $data['account_lastname'] ||
|
$old['account_lastname'] != $data['account_lastname'] ||
|
||||||
$old['account_email'] != $data['account_email']))
|
$old['account_email'] != $data['account_email']))
|
||||||
{
|
{
|
||||||
if (!$data['person_id']) $data['person_id'] = $old['person_id'];
|
if (!$data['person_id'])
|
||||||
|
{
|
||||||
|
$data['person_id'] = $old['person_id'];
|
||||||
|
}
|
||||||
|
|
||||||
// Include previous contact information to avoid blank history rows
|
// Include previous contact information to avoid blank history rows
|
||||||
$contact = (array)$GLOBALS['egw']->contacts->read($data['person_id']) + array(
|
$contact = array_merge((array)$GLOBALS['egw']->contacts->read($data['person_id']), array(
|
||||||
'n_given' => $data['account_firstname'],
|
'n_given' => $data['account_firstname'],
|
||||||
'n_family' => $data['account_lastname'],
|
'n_family' => $data['account_lastname'],
|
||||||
'email' => $data['account_email'],
|
'email' => $data['account_email'],
|
||||||
'account_id' => $data['account_id'],
|
'account_id' => $data['account_id'],
|
||||||
'id' => $data['person_id'],
|
'id' => $data['person_id'],
|
||||||
'owner' => 0,
|
'owner' => 0,
|
||||||
);
|
));
|
||||||
$GLOBALS['egw']->contacts->save($contact, true); // true = ignore addressbook acl
|
$GLOBALS['egw']->contacts->save($contact, true); // true = ignore addressbook acl
|
||||||
}
|
}
|
||||||
// save primary group if necessary
|
// save primary group if necessary
|
||||||
|
Loading…
Reference in New Issue
Block a user