diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index 7be3d69..438b3bf 100644 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -156,6 +156,10 @@ class UsersController extends AppController if (Configure::read('keycloak.enabled')) { $this->Users->enrollUserRouter($data); } + if ($data['individual_id']) { + $data['individual'] = $this->Users->Individuals->find('all')->where(['id' => $data['individual_id']])->contain(['Alignments' => 'Organisations'])->first(); + } + return $data; }, 'afterFind' => function ($user, &$params) use ($currentUser) { if (!empty($user)) { // We don't have a 404