mirror of https://github.com/MISP/MISP
chg: [user:saveNotificationSettings] Save tags setting as empty array if not provided
parent
00c818cb45
commit
6c3a5f5dd0
|
@ -1695,10 +1695,14 @@ class User extends AppModel
|
|||
]);
|
||||
if ($success) {
|
||||
$periodic_settings = $data['periodic_settings'];
|
||||
if (empty($periodic_settings['tags'])) {
|
||||
$periodic_settings['tags'] = '[]';
|
||||
} else {
|
||||
$decodedTags = json_decode($periodic_settings['tags'], true);
|
||||
if ($decodedTags === null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$notification_filters = [
|
||||
'orgc_id' => $periodic_settings['orgc_id'] ?? [],
|
||||
'distribution' => $periodic_settings['distribution'] ?? '',
|
||||
|
|
Loading…
Reference in New Issue