Hi ,
I need to fetch list active aem users for a certain period of time in aem author environment for some business requirement . Can you help ways to find out.
TIA.
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, there is no property to track user status under home/users
If it is a new requirement then I suggest you to use Sling Filters, this will fire for every request, so you can read the username and write it in either separate log file or use impersonation and write a new property to the logged in USER which is active=true
The first approach is very useful when you want to track other things not only usernames and the second approach is useful when you want to find only usernames by writing a simple query
Just a thought, First, check your requirements and if your requirements meet audit logs then you can check audit logs also, but you need to query audit logs
http://keysandstrokes.info/aem-sling-filters/
If you want to find out on the existing repository then
You can take out the logs and write simple java utility but I am not sure this will contains the username or not, but you need to check
Another approach which is complex one is writing a query which executes based on the date range predicate filter, get the list of the users and query against each node on lastModifiedBy property, but I am not sure this will meet your exact requirement or not. because if the author is not modified?
Views
Replies
Total Likes
You can use Query Builder API to retrieve users as suggested in this community thread - can i retrieve the users list and along with their group names in query builder?
However - in AEM - the user node does not contain a property that tracks if a user has been active:
Views
Replies
Total Likes
See this thread for a similiar discussion on tracking user activity - How to log / monitor user activity in AEM6
Views
Replies
Total Likes
These 3 logs can help you with your use-case:
Logs are located at <cq-installation-dir>/crx-quickstart/logs
Views
Replies
Total Likes
Yes, there is no property to track user status under home/users
If it is a new requirement then I suggest you to use Sling Filters, this will fire for every request, so you can read the username and write it in either separate log file or use impersonation and write a new property to the logged in USER which is active=true
The first approach is very useful when you want to track other things not only usernames and the second approach is useful when you want to find only usernames by writing a simple query
Just a thought, First, check your requirements and if your requirements meet audit logs then you can check audit logs also, but you need to query audit logs
http://keysandstrokes.info/aem-sling-filters/
If you want to find out on the existing repository then
You can take out the logs and write simple java utility but I am not sure this will contains the username or not, but you need to check
Another approach which is complex one is writing a query which executes based on the date range predicate filter, get the list of the users and query against each node on lastModifiedBy property, but I am not sure this will meet your exact requirement or not. because if the author is not modified?
Views
Replies
Total Likes
Excellent answer!
Views
Replies
Total Likes
Views
Likes
Replies