code: public Node getUserNode(SessionProvider sessionProvider, String userName) throws Exception
     {
        Session session = getSession(sessionProvider);
  
        Node usersNode = getRootOfUsersNodes(session);
  
        DataDistributionType type =
           dataDistributionManager_.getDataDistributionType(oldDistribution ? DataDistributionMode.NONE
              : DataDistributionMode.READABLE);
        Node userHomeNode;
        try {
          userHomeNode = type.getDataNode(usersNode, userName);
        } catch (PathNotFoundException e) {
          userHomeNode = null;
        }
        if (userHomeNode == null) {
          userHomeNode = type.getOrCreateDataNode(usersNode, userName);
          session.save();
          try {
            if (userHomeNode.canAddMixin("exo:userFolder")) {
              userHomeNode.addMixin("exo:userFolder");
              session.save();
            }
          } catch (NoSuchNodeTypeException e) {
            LOG.trace("can't add mixin 'exo:userFolder' to folder " + userHomeNode.getPath(), e);
          }
          processAddPathPlugin(userPathPlugins_, userHomeNode.getPath(), userName);
        }
        return userHomeNode;
     }
docs: {@inheritDoc}