Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,121
Community Members
 
Community Events
165
Community Groups

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

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

 

2 answers

1 accepted

2 votes
Answer accepted

Hi @Shelly Gez .
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

What Confluence DB table would the be run over? 

@Bob Vasey - I am using postgresql

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

996 views 16 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you