Skip to content

Instantly share code, notes, and snippets.

@AFaust
Created October 5, 2022 16:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AFaust/578c0bb19a5a1fb7edb2a2419a817d99 to your computer and use it in GitHub Desktop.
Save AFaust/578c0bb19a5a1fb7edb2a2419a817d99 to your computer and use it in GitHub Desktop.
Alfresco Audit alfresco-access Login Summary
select
unpsv.string_value as user,
max(audit_time) as lastLoginTime,
count(*) as loginCounts
from
alf_prop_link pl
left join alf_audit_entry ae on ae.audit_values_id = pl.root_prop_id
left join alf_prop_value unpv on unpv.id = ae.audit_user_id
left join alf_prop_string_value unpsv on unpsv.id = unpv.long_value
where
unpv.persisted_type = 3
and key_prop_id in (
select
pv.id
from
alf_prop_value pv
left join alf_prop_string_value psv on psv.id = pv.long_value
where
pv.persisted_type = 3
and psv.string_value = '/alfresco-access/login/user'
)
group by unpsv.string_value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment