users
System Administrator
Jahia 7.3
Jahia 8
Legacy
How to export information about a user?
Question
Is there a way to export information of users in Jahia?
Answer
Sample JCR script:
javax.jcr.NodeIterator nodeIterator = session.getWorkspace().getQueryManager().createQuery("SELECT * FROM [jnt:user]", Query.JCR_SQL2).execute().getNodes();
while(nodeIterator.hasNext()) {
JCRNodeWrapper node = (JCRNodeWrapper) nodeIterator.next();
log.info(node.getPropertyAsString("j:firstName") + "," + node.getPropertyAsString("j:lastName") + "," + node.getPropertyAsString("j:email"));
}