mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
* Admin/PostgreSQL: adding new accounts failed
because they were added with account_id=0, which is stored literaly in postgres but created a new auto-id in mysql, unsetting it works of cause for both
This commit is contained in:
parent
cd8f1cdd4f
commit
1465d5065b
@ -159,7 +159,7 @@ class admin_account
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Make sure primary group is in account groups
|
// Make sure primary group is in account groups
|
||||||
if($account['account_primary_group'] && !array_search($account['account_primary_group'], $account['account_groups']))
|
if($account['account_primary_group'] && !array_search($account['account_primary_group'], (array)$account['account_groups']))
|
||||||
{
|
{
|
||||||
$account['account_groups'][] = $account['account_primary_group'];
|
$account['account_groups'][] = $account['account_primary_group'];
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,10 @@ class admin_cmd_edit_user extends admin_cmd_change_pw
|
|||||||
if (is_null($value)) $value = $old[$name];
|
if (is_null($value)) $value = $old[$name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset($data['account_id']); // otherwise add will fail under postgres
|
||||||
|
}
|
||||||
// hook allowing apps to intercept adding/editing accounts before saving them
|
// hook allowing apps to intercept adding/editing accounts before saving them
|
||||||
$GLOBALS['egw']->hooks->process($data+array(
|
$GLOBALS['egw']->hooks->process($data+array(
|
||||||
'location' => $this->account ? 'pre_editaccount' : 'pre_addaccount',
|
'location' => $this->account ? 'pre_editaccount' : 'pre_addaccount',
|
||||||
@ -221,7 +225,7 @@ class admin_cmd_edit_user extends admin_cmd_change_pw
|
|||||||
* parse the expired string and return the expired date as timestamp
|
* parse the expired string and return the expired date as timestamp
|
||||||
*
|
*
|
||||||
* @param string $str date, 'never', 'already' or '' (=dont change, or default of never of new accounts)
|
* @param string $str date, 'never', 'already' or '' (=dont change, or default of never of new accounts)
|
||||||
* @param boolean $exists
|
* @param boolean $existing
|
||||||
* @return int timestamp, 0 for already, -1 for never or null for dont change
|
* @return int timestamp, 0 for already, -1 for never or null for dont change
|
||||||
* @throws egw_exception_wrong_userinput(lang('Invalid formated date "%1"!',$datein),6);
|
* @throws egw_exception_wrong_userinput(lang('Invalid formated date "%1"!',$datein),6);
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user