diff --git a/src/controllers/ProfileChangeNameController.ts b/src/controllers/ProfileChangeNameController.ts index ae4c900f..d6a0d2aa 100644 --- a/src/controllers/ProfileChangeNameController.ts +++ b/src/controllers/ProfileChangeNameController.ts @@ -199,6 +199,13 @@ export class ProfileChangeNameController extends Controller { await this.profileRepository.save(profile); } + if (profile != null && profile.keycloak != null) { + const result = await updateName(profile.keycloak, profile.firstName, profile.lastName); + if (!result) { + throw new Error(result.errorMessage); + } + } + return new HttpSuccess(); }