mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
fix unhandled exception stalling LDAP/AD account sync
not (yet) fixing the cause, but logging it as error and continuing
This commit is contained in:
parent
96a18c8bf4
commit
6c917cd369
@ -251,7 +251,7 @@ class Import
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->logger("Error creaing user '$account[account_lid]' (#$account[account_id])", 'error');
|
||||
$this->logger("Error creating user '$account[account_lid]' (#$account[account_id])", 'error');
|
||||
$errors++;
|
||||
continue;
|
||||
}
|
||||
@ -284,7 +284,10 @@ class Import
|
||||
$this->logger("Dry-run: would updated user '$account[account_lid]' (#$account_id): " .
|
||||
json_encode($diff, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), 'detail');
|
||||
}
|
||||
elseif ($this->accounts_sql->save($to_update) > 0)
|
||||
else
|
||||
{
|
||||
try {
|
||||
if ($this->accounts_sql->save($to_update) > 0)
|
||||
{
|
||||
// run editaccount hook to create eg. home-directory or mail account
|
||||
Api\Hooks::process($to_update+array(
|
||||
@ -302,6 +305,14 @@ class Import
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
$this->logger("Error updating user '$account[account_lid]' (#$account_id): ".$e->getMessage().' ('.$e->getCode().')', 'error');
|
||||
$this->logger('$to_update='.json_encode($to_update, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), 'error');
|
||||
$errors++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->logger("User '$account[account_lid]' (#$account_id) already up to date", 'debug');
|
||||
|
Loading…
Reference in New Issue
Block a user