Use `state` field to indicate if Keycloak user is enabled
@@ -597,7 +597,12 @@ public class TenantManagementKeycloakImpl implements TenantManagementInterface {
profile.setLastAccessTime(0);
profile.setCreationTime(0);
profile.setValidUntil(0);
- profile.setState(Status.ACTIVE);
+ // Use state field to indicate whether user has been enabled in Keycloak
+ if (userRepresentation.isEnabled()) {
+ profile.setState(Status.CONFIRMED);
+ } else {
+ profile.setState(Status.PENDING_CONFIRMATION);
+ }
return profile;
}
