I am trying to write a utilty to email out a listing of any users that haven't logged in to a repository within a given time period... say one month. Is it possible to pull that information? I was thinking it would be in the Session Class in Repository Access but I think that only allows me to pull information for the current user.
Question
Question
Last Login
Answer
The Trustee class has methods like EnumAllWindowsAccounts(). For repository users, I think you want to start with Account.EnumAll() and use Trustee.GetInfo() on the results.
Replies
Right, the Session.LastLogIn property tells you about the current user. The TrusteeInfo class has a LastLogOn property that tells you when that trustee last connected to the repository.
I was looking at the TrusteeInfo class and I don't see any constuctors that let me point to a trustee. So how can I loop through all the trustees in a specified repository?
The Trustee class has methods like EnumAllWindowsAccounts(). For repository users, I think you want to start with Account.EnumAll() and use Trustee.GetInfo() on the results.
is there also a way to find out when an account is created?
I don't see this exposed in the SDK, and I'm not actually sure the Laserfiche server records it in the database. Of course it would apply to just some types of users, for Windows users you could query the AD server.
Creation date is not recorded for Laserfiche users.
While not directly involving the SDK, the Laserfiche Server does audit the trustee creation event so if you are still wanting to find out when a trustee was created, then as long as the "Account" audit event class is being audited and the Audit Trail date range is configured accordingly, you can query the Audit Trail database, specifically the [account_events] view. You'll want to look for [event_type]=7 and name of the trustee in the [trustee_name] column. Then you can check the [event_time] which gives you when the trustee was created. If your Audit Trail edition allows for auditing successes and failures and you are only concerned with the successful creation of a trustee, then you can also check for [succeeded]=1.