protected User getUser()

in src/main/java/org/apache/sling/auth/xing/api/AbstractXingUserManager.java [70:89]


    protected User getUser(final String userId) {
        logger.info("getting user with id '{}'", userId);
        try {
            final Session session = getSession();
            final UserManager userManager = getUserManager(session);
            final Authorizable authorizable = userManager.getAuthorizable(userId);
            if (authorizable != null) {
                if (authorizable instanceof User) {
                    final User user = (User) authorizable;
                    logger.debug("user for id '{}' found", userId);
                    return user;
                } else {
                    logger.debug("found authorizable with id '{}' is not an user", authorizable.getID());
                }
            }
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
        return null;
    }