mirror of https://github.com/MISP/MISP
fix: [sync] better logging of error messages and handle the user ID not being set by background processes
parent
6255f631cb
commit
14400a932d
|
@ -1169,8 +1169,10 @@ class Event extends AppModel
|
|||
$newTextBody = $response->body();
|
||||
return 404;
|
||||
case '405':
|
||||
$newTextBody = $response->body();
|
||||
return 405;
|
||||
case '403': // Not authorised
|
||||
$newTextBody = $response->body();
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
@ -2153,7 +2155,9 @@ class Event extends AppModel
|
|||
$this->Feed = ClassRegistry::init('Feed');
|
||||
}
|
||||
// Precache current user email
|
||||
$userEmails = array($user['id'] => $user['email']);
|
||||
if (!empty($user['id'])) {
|
||||
$userEmails = array($user['id'] => $user['email']);
|
||||
}
|
||||
// Do some refactoring with the event
|
||||
$fields = array(
|
||||
'common' => array('distribution', 'sharing_group_id', 'uuid'),
|
||||
|
|
Loading…
Reference in New Issue