Merge branch 'main' into develop
commit
c5e6016251
|
@ -75,15 +75,15 @@ class InboxTable extends AppTable
|
||||||
$errors[] = __('Unkown brood `{0}`', $entryData['data']['cerebrateURL']);
|
$errors[] = __('Unkown brood `{0}`', $entryData['data']['cerebrateURL']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$found = false;
|
// $found = false;
|
||||||
foreach ($user->individual->organisations as $organisations) {
|
// foreach ($user->individual->organisations as $organisations) {
|
||||||
if ($organisations->id == $brood->organisation_id) {
|
// if ($organisations->id == $brood->organisation_id) {
|
||||||
$found = true;
|
// $found = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (!$found) {
|
// if (!$found) {
|
||||||
$errors[] = __('User `{0}` is not part of the brood\'s organisation. Make sure `{0}` is aligned with the organisation owning the brood.', $user->individual->email);
|
// $errors[] = __('User `{0}` is not part of the brood\'s organisation. Make sure `{0}` is aligned with the organisation owning the brood.', $user->individual->email);
|
||||||
}
|
// }
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,9 @@ class IndividualsTable extends AppTable
|
||||||
$this->saveMetaFields($id, $individual);
|
$this->saveMetaFields($id, $individual);
|
||||||
}
|
}
|
||||||
if (!empty($individual['alignments'])) {
|
if (!empty($individual['alignments'])) {
|
||||||
|
$Organisation = \Cake\ORM\TableRegistry::getTableLocator()->get('Organisations');
|
||||||
foreach ($individual['alignments'] as $alignment) {
|
foreach ($individual['alignments'] as $alignment) {
|
||||||
$org_id = $this->Organisation->captureOrg($alignment['organisation']);
|
$org_id = $Organisation->captureOrg($alignment['organisation']);
|
||||||
if ($org_id) {
|
if ($org_id) {
|
||||||
$this->Alignments->setAlignment($org_id, $individual->id, $alignment['type']);
|
$this->Alignments->setAlignment($org_id, $individual->id, $alignment['type']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue