AuthenticationRegistry authRegistry = getApplicationComponent(AuthenticationRegistry.class);
User portalUser = (User)authRegistry.getAttributeOfClient(Util.getPortalRequestContext().getRequest(), OAuthConstants.ATTRIBUTE_AUTHENTICATED_PORTAL_USER);
if (portalUser == null) {
log.warn("portalUser from OAuth login is not available!");
this.portalUser = new UserImpl();
} else {
this.portalUser = portalUser;
}
setupUserToRegisterForm();