mirror of https://github.com/MISP/MISP
chg: [Command:TrainingShell] Only override org_id if org_uuid is provided
parent
28179ced9c
commit
cfc12b38cf
|
@ -156,7 +156,9 @@ class TrainingShell extends AppShell {
|
|||
$config = json_decode($rawConfig, true);
|
||||
$createdUsers = [];
|
||||
foreach ($config as $user) {
|
||||
$user['org_id'] = $createdOrgs[$user['org_uuid']]['id'];
|
||||
if (!empty($user['org_uuid'])) {
|
||||
$user['org_id'] = $createdOrgs[$user['org_uuid']]['id'];
|
||||
}
|
||||
$existingUser = $this->User->find('first', [
|
||||
'recursive' => -1,
|
||||
'conditions' => ['User.email' => $user['email']],
|
||||
|
|
Loading…
Reference in New Issue