Atlassian Crowd - get all user attributes, including last login

Some organizations use Atlassian Crowd with other Atlassian software - especially Jira and Confluence - to manage user logins and provide for single login to several systems.

While Crowd works well enough, it lacks some features that would be helpful - such as a simple export listing when users have logged in or changed their passwords.

If you have the ability to interact directly with the Crowd database, you can export this information manually using the following command:

SELECT cwd_user.*,
   from_unixtime(attr1.attribute_value/1000) AS 'passwordLastChanged',
   from_unixtime(attr2.attribute_value/1000) AS 'lastAuthenticated',
   from_unixtime(attr3.attribute_value/1000) AS 'lastActive',
   attr4.attribute_value AS 'requiresPasswordChange',
   attr5.attribute_value AS 'invalidPasswordAttempts'
FROM
   cwd_user
   LEFT JOIN cwd_user_attribute AS attr1
      ON(cwd_user.id=attr1.user_id and attr1.attribute_name='passwordLastChanged')
   LEFT JOIN cwd_user_attribute AS attr2
      ON(cwd_user.id=attr2.user_id and attr2.attribute_name='lastAuthenticated')
   LEFT JOIN cwd_user_attribute AS attr3
      ON(cwd_user.id=attr3.user_id and attr3.attribute_name='lastActive')
   LEFT JOIN cwd_user_attribute AS attr4
      ON(cwd_user.id=attr4.user_id and attr4.attribute_name='requiresPasswordChange')
   LEFT JOIN cwd_user_attribute AS attr5
      ON(cwd_user.id=attr5.user_id and attr5.attribute_name='invalidPasswordAttempts')
      

It seems like this should be a built-in feature. That would certainly make life easier for people administering Confluence and Jira installations.