if (profileInfo == null)
{
//obtain main UserProfileModule
UserProfileModule module = (UserProfileModule)getIdentityContext().getObject(IdentityContext.TYPE_USER_PROFILE_MODULE);
if (module == this)
{
throw new IdentityException("ProfileInfo not accessible - check configuration");
}
else
{
setProfileInfo(module.getProfileInfo());
}
}
return profileInfo;
}