Reputation: 69
I am new to ASP.NET membership, and most solutions so far do not work for me.I want to implement a simple query that check if a user is online and returns boolean result.I am using ASP.NET Membership and profile provider.
Maybe a function like this:
public boolean IsUserOnline(string userName)
{
boolean result ={some query string here......}
return result;
}
Any ideas??
Upvotes: 2
Views: 2422
Reputation: 25684
Asp.NET membership does this for you:
Membership.GetUser(username).IsOnline
The length of time since the last request from the user to be considered online is available via the Membership.UserIsOnlineTimeWindow
property.
Upvotes: 5