class UserOrgServiceImpl implements UserOrgService {

    @Override
    @Transactional
    public ProfileDTO getProfileInfo(String userId, Authentication authentication)
    {
        UserOrg userOrg = getUserOrgForUserId(userId);
        if (userOrg == null)
        {
            log.info("Profile info for the user [{}] is not found", userId);
            // add only user data like full name, email, userId , groups
            userOrg = createUserOrgForUser(userId);
            try
            {
                userOrg = saveUserOrgTransaction(userOrg, authentication);
                getEventPublisher().publishProfileEvent(userOrg, authentication, true, true);
            }
            catch (MuleException e)
            {
                log.error("UserOrg for user [{}] was not saved. {}", userId, e);
                getEventPublisher().publishProfileEvent(userOrg, authentication, true, false);
            }
        }

        AcmUser user = userDao.findByUserId(userId);
        return createProfileDTO(userOrg, user.getGroups());
    }

}