/
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
Listing pages that were modified by current user
Listing pages that were modified by current user
More like this
users-report macro
users-report macro
More like this
Showing Recently Updated Pages in a Table
Showing Recently Updated Pages in a Table
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
How to use SQL for Confluence with Run Self Service Reports for dynamic content
How to use SQL for Confluence with Run Self Service Reports for dynamic content
More like this