Hi all,
How to get the list of user's group which is having count less than 5 using query debugger? Please share the query statement for this condition. Aem version is aem cloud
Thank you.
Solved! Go to Solution.
Views
Replies
Total Likes
No, you can't check that.
I don't know your use case but you can leverage jcr:createdBy property to filter out further
I dont think you can a write a query in debugger to find the number of users in each group. You might need to use the group API [1] in custom code and call the getMembers()
method and iterate it to find the size.
Hi,
You cannot achieve this using query alone, once you have results from below query then you need to write java code to check group member count
type=rep:Group path=/home/groups property=rep:members property.value=true property.operation=exists p.limit=-1
UserManager userManager = resourceResolver.adaptTo(UserManager.class); Group group = (Group) userManager.getAuthorizable(groupFromQuery); if (group.getMembers() < 5){
// TODO
}
Hi @arunpatidar ,
Can we check in query debugger whether the group is automatically created? Or is there any property that defines automatically created group?
No, you can't check that.
I don't know your use case but you can leverage jcr:createdBy property to filter out further
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies