Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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