in src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java [264:297]
protected void handleOperation(SlingHttpServletRequest request,
PostResponse response, List<Modification> changes)
throws RepositoryException {
Session session = request.getResourceResolver().adaptTo(Session.class);
String principalName = request.getParameter(SlingPostConstants.RP_NODE_NAME);
User user = createUser(session,
principalName,
request.getParameter("pwd"),
request.getParameter("pwdConfirm"),
request.getRequestParameterMap(),
changes);
String userPath = null;
if (user == null) {
if (!changes.isEmpty()) {
Modification modification = changes.get(0);
if (modification.getType() == ModificationType.CREATE) {
userPath = modification.getSource();
}
}
} else {
userPath = systemUserManagerPaths.getUserPrefix()
+ user.getID();
}
if (userPath != null) {
response.setPath(userPath);
response.setLocation(externalizePath(request, userPath));
}
response.setParentLocation(externalizePath(request,
systemUserManagerPaths.getUsersPath()));
}