/
Create a report of users last login
Create a report of users last login
- In the SIL Manager create a new file called userLoginReport.sil
Paste the following code into the file:
struct login { string userName; date loginDate; } string sql = "SELECT cu.user_name, " + "li.successdate " + "FROM logininfo li " + "JOIN user_mapping um ON um.user_key = li.username " + "JOIN cwd_user cu ON um.username = cu.user_name " + "JOIN cwd_directory cd ON cu.directory_id = cd.id " + "ORDER BY successdate"; login [] logins = sql("confluence_DB", sql); return logins;
- Save the file
- Create a new page for the user report
- Add the SIL Table macro to the page
- Edit the macro
- Enter userLastLogin.sil for the script setting
- Enter "Username, Last Login Date" for the columns setting
- Save the changes to the macro
You should now see a user login report when you view the page similar to the report below.
, multiple selections available,
Related content
How to retrieve user's last login information using Confluence Command Line Interface(CLI)
How to retrieve user's last login information using Confluence Command Line Interface(CLI)
More like this
users-report macro
users-report macro
More like this
How to retrieve the last login information of the user(s) using Jira Command Line Interface(CLI)
How to retrieve the last login information of the user(s) using Jira Command Line Interface(CLI)
More like this
Show a list of active users
Show a list of active users
More like this
Generate a list of groups for the current user
Generate a list of groups for the current user
More like this
List pages modified by the current user
List pages modified by the current user
More like this