public User getUser(final JID user) throws UserNotFoundException {
        if (user == null) {
            throw new UserNotFoundException("user cannot be null");
        }

        if (!xmppServer.isLocal(user)) {
            throw new UserNotFoundException("Cannot get remote user");
        }

        return getUser(user.getNode());
    }
Returns the User specified by jid node.

@param user the username of the user.
@return the User that matches {@code username}.
@throws UserNotFoundException if the user does not exist.
xmppserver/src/main/java/org/jivesoftware/openfire/user/UserManager.java