Community in read only mode June 18 & 19
This community will be set in READ ONLY mode for a while on Tuesday June 18 into Wednesday June 19 while we import content and users from our Micro Focus Forums community site. MORE INFORMATION
Highlighted
Kengland Trusted Contributor.
Trusted Contributor.
567 views

User log in report

Hi All,

Is it possible to run a report of all users and when they last logged in?  Essentially I am wanting to run a yearly report to capture any licensed users that haven't logged into Content Manager - so that we can clean up our user licenses!

I've looked at some searches - but can't seem to narrow it down well enough.

Thanks,

Kaye

0 Likes
5 Replies
JanMartin Outstanding Contributor.
Outstanding Contributor.

Re: User log in report

iCognition has a solution that can deliver this capability. PM me if you are interested in more information and ill put you in touch with person that can help

0 Likes
Strider_1 Honored Contributor.
Honored Contributor.

Re: User log in report

Yes!

It is possible to search by 'historical event' and then by 'user/location'.

I do this regularly and then use excel to filter the results.

PM me if you want some assistance.

Cheers

0 Likes
Outstanding Contributor.. AG_LTBit Outstanding Contributor..
Outstanding Contributor..

Re: User log in report

Hi Kaye,

You can run/get your dba to run the following on the database. It will give you the last time a location interacted with Content Manager. Works on the same principle as Strider's answer (using the Online Audit Log), except you don't have to filter, etc. manually in Excel.

SELECT loc.[uri] As 'Location URI', loc.[lcName] As 'Location Name',ll.[llLogsInAs] As 'Username',email.[leAddress] As 'Email Address', MAX(oal.[oaDoneAt]) As 'Users Last Activity'
FROM [TSLOCATION] loc LEFT JOIN [TSONLINEAU] oal
ON  loc.[uri] = oal.[oaDoneByUri]
LEFT JOIN [TSLOCLOGIN] ll
ON loc.[uri] = ll.[llLocUri]
LEFT JOIN [TSLOCEADDR] email
ON loc.[uri] = email.[leLocUri]
WHERE oal.[oaDoneByUri] IS NOT NULL AND email.[leMailType] = 'SMTP'
GROUP BY loc.[uri], loc.[lcName], ll.[llLogsInAs], email.[leAddress]
ORDER BY [Users Last Activity] DESC

Good luck.

AG.

-----------------------------------------------------------------------
www.ltbit.com.au
0 Likes
Regular Contributor.. rkw Regular Contributor..
Regular Contributor..

Re: User log in report

This will assist going forward. You can implement a custom event addin to update two user defined fields on the said location when they login once a day. Then over time all you need to do is run a location search filtered by Last Login Time UDF to tell you the last time a user logged into the TRIM.

 

public class CustomUserLoginLogOffAddin : TrimEventProcessorAddIn
{

public override void ProcessEvent(Database db, TrimEvent evt)
{
try
{
if (evt.EventType == Events.UserLogon)
{
Location currentUserLogin = new Location(db, evt.LoginUri);
FieldDefinition udfLastLoginTimeStamp = new FieldDefinition(db, "Login Time Stamp");
FieldDefinition udfLastLoginWorkstationID = new FieldDefinition(db, "Login Workstation ID");

UserFieldValue userFieldValueLastLoginDate = currentUserLogin.GetFieldValue(udfLastLoginTimeStamp);
TrimDateTime trimDateTimeLastLoginValue = userFieldValueLastLoginDate.AsDate();

if (trimDateTimeLastLoginValue == evt.EventDate)
{
return;
}

currentUserLogin.SetFieldValue(udfLastLoginTimeStamp, new UserFieldValue(evt.EventDate));
currentUserLogin.SetFieldValue(udfLastLoginWorkstationID, new UserFieldValue(evt.FromMachine));
currentUserLogin.Save();

}
}
catch (Exception ex)
{

}
}
}

0 Likes
Sten28 Outstanding Contributor.
Outstanding Contributor.

Re: User log in report

If your amount of users is not too large, you can use this manual method to check each user individually:

  1. Build a list of users by Unique Name (if you don't use these, then use Location URI)
  2. Do a records search, sorted by "Last Updated" descending, and filtered to a User Unique Name/URI
  3. Note the date
  4. Rinse and repeat

It it's a bit more time consuming, but you can really comb through your users this way.

Also note this may not apply for users who don't touch records at all - i.e. Managers 😉

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.