Is there a way to get the last login time from an SPUser object? I don't want the last login time to Active Directory, but specifically for the sharepoint site.
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
To my knowledge there is no direct way to retrieve this easily. Enabling Audit logs is not a good call as it creates a lot of data for nothing, and particularly it is per Site Collection, which leaves the question : "do you enable this for all site collections?" - you are in for a tremendous amount of information - weight that carefully. In the past we've used 2 approaches:
|
|||
|
|
Your best bet on the sharepoint side would be the audit logs. You can enabled it to show a good amount of activity. So for your purpose, a login would most likely constitute a masterpage read. which would show up as:
|
|||