rootNode.getNode(path).setProperty(PASSWD_PROPERTY, hashedSaltedPassword);
session.save();
} catch (PathNotFoundException e) {
// user not found
getLogger().debug("User not found");
throw new UsersRepositoryException("User " + user.getUserName() + " not exist");
}
} finally {
session.logout();
}
} catch (RepositoryException e) {
if (getLogger().isInfoEnabled()) {
getLogger().info("Failed to add user: " + userName, e);
}
throw new UsersRepositoryException("Failed to add user: " + userName, e);
}
}
}