How to Get a List of Users Who Have Modified Pages Recently

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

Sometimes it is useful for an administrator to find which users have created or edited content recently. This KB illustrates how to query the database via SQL to retrieve this information quickly.

Related KBs:

Solution

The example SQL below retrieves all users who have created or edited content since May 1, 2016. The date can be modified as needed. Note that different databases may have different formats for the date field as well, which may require further tweaks. 

Postgres example:

SELECT um.lower_username
FROM user_mapping um
JOIN CONTENT c
  ON um.user_key = c.lastmodifier
WHERE c.lastmoddate >= '2016-05-01'
GROUP BY um.lower_username;


Microsoft SQL Server example:

SELECT um.lower_username
FROM user_mapping um
JOIN CONTENT c
  ON um.user_key = c.LASTMODIFIER
WHERE c.LASTMODDATE >= '2016-05-01'
GROUP BY um.lower_username;

Oracle example:

SELECT um.lower_username
FROM user_mapping um
JOIN CONTENT c
  ON um.user_key = c.lastmodifier
WHERE c.lastmoddate >= '01-Jan-2016'
GROUP BY um.lower_username;

Last modified on Jun 7, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.