Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the List of all active & inactive users with last login from confluence DB ?

Deleted user April 24, 2022

How to get the List of all active & inactive users with last login from confluence DB ?

 

I am using this postgres command, wanted to add the active/inactive table.

Can you assist?

 

SELECT cu.display_name, cu.email_address,
cd.directory_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;

 

Thanks,

Shelly

 

3 answers

1 accepted

2 votes
Answer accepted
Thiago Masutti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2022

Hi @[deleted] .
I hope you are well.

The following query adds the active column.
It also shows users that never logged in.

 

SELECT cu.display_name, cu.email_address, cu.active,
cd.directory_name,
li.successdate
FROM logininfo li
right 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;

 

Kind regards,
Thiago Masutti

Deleted user April 24, 2022

Thanks @Thiago Masutti  - worked !

Bob Vasey June 8, 2022

What Confluence DB table would the be run over? 

0 votes
Moses Ebrahimi
Contributor
February 9, 2023

any help for Postgresql ? thanks @Thiago Masutti 

0 votes
Deleted user June 8, 2022

@Bob Vasey - I am using postgresql

Mahesh Kallepalli
Contributor
March 10, 2023

@[deleted]  When I used above select query getting duplicate results. Could you please help me with that.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events