I have a userID/userName, and I want to know if that user is currently loggedon to the SharePoint site.

The SPUser object does not seem to have any of these properties. I looked at Membership.GetUser("username").IsOnline, but that threw an "Access Denied" error.

Is there any way to achieve this?

Many Thanks!

UPDATE: I even tried to run with ElevatedPrivelges. The error is that current user does not has access to /APP_DATA folder.


The disassembly for the IsOnline property looks like this:

return this.LastActivityDate.ToUniversalTime() > DateTime.UtcNow.Subtract(new TimeSpan(0, SystemWebProxy.Membership.UserIsOnlineTimeWindow, 0));

Is it possible you could use the same methodology?

Not like this is an actual real time tracker or anything ...

The other option would be to provision a delegate control and use JavaScript object model to push user actions into a list. You could probably just overload the SearchBoxEX control to add tracking. Seems like a waste to me though.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.