mirror of https://github.com/MISP/MISP
fix: [Workflow:UserBeforeSave] Ignore workflow execution for logins and logouts
parent
8bc91d53d5
commit
0a478bfda0
|
@ -280,8 +280,14 @@ class User extends AppModel
|
|||
'id' => $user_id,
|
||||
'message' => __('The workflow `%s` prevented the saving of user %s', $trigger_id, $user_id),
|
||||
];
|
||||
$success = $this->executeTrigger($trigger_id, $user['User'], $workflowErrors, $logging);
|
||||
return !empty($success);
|
||||
if (
|
||||
$user['User']['action'] != 'logout' &&
|
||||
$user['User']['action'] != 'login'
|
||||
) {
|
||||
$success = $this->executeTrigger($trigger_id, $user['User'], $workflowErrors, $logging);
|
||||
return !empty($success);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function afterSave($created, $options = array())
|
||||
|
|
Loading…
Reference in New Issue