mirror of https://github.com/MISP/MISP
chg: [console:server] Stop execution if user does not exists
parent
6c5c5855c5
commit
4100af2a30
|
@ -38,6 +38,9 @@ class ServerShell extends AppShell
|
|||
}
|
||||
$userId = $this->args[0];
|
||||
$user = $this->User->getAuthUser($userId);
|
||||
if (empty($user)) {
|
||||
die('User ID do not match an existing user.' . PHP_EOL);
|
||||
}
|
||||
if (empty($this->args[1])) die();
|
||||
$serverId = $this->args[1];
|
||||
if (!empty($this->args[2])) {
|
||||
|
|
Loading…
Reference in New Issue