chg: [console:server] Stop execution if user does not exists

pull/5572/head
mokaddem 2020-01-22 16:07:59 +01:00
parent 6c5c5855c5
commit 4100af2a30
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 0 deletions

View File

@ -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])) {