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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted] When I used above select query getting duplicate results. Could you please help me with that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.