diff --git a/src/controllers/UserController.ts b/src/controllers/UserController.ts index aa1a902b..43c04b32 100644 --- a/src/controllers/UserController.ts +++ b/src/controllers/UserController.ts @@ -151,7 +151,9 @@ export class KeycloakController extends Controller { }); if (profile) { + let _null: any = null; profile.keycloak = userId; + profile.email = body.email == null ? _null : body.email; await this.profileRepo.save(profile); if (body.roles != null && body.roles.length > 0) { const roleKeycloak = await this.roleKeycloakRepo.find({