code: private void createUser(Session session, UserImpl user, boolean broadcast) throws Exception
     {
        Node userStorageNode = utils.getUsersStorageNode(session);
        Node userNode = userStorageNode.addNode(user.getUserName());
  
        if (user.getCreatedDate() == null)
        {
           Calendar calendar = Calendar.getInstance();
           user.setCreatedDate(calendar.getTime());
        }
        user.setInternalId(userNode.getUUID());
  
        if (broadcast)
        {
           preSave(user, true);
        }
  
        writeUser(user, userNode);
        session.save();
  
        putInCache(user);
  
        if (broadcast)
        {
           postSave(user, true);
        }
     }
docs: Persists new user.