fix: [users] add load individual correctly and show it to the user
parent
5048c38ed6
commit
d4880e7b56
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue