2

When implementing a custom membership provider I see that the underlying data model has ISONLINE column in the USER table, as described here: http://msdn.microsoft.com/en-us/library/6tc47t75.aspx

Question: When is this field actually updated in the database? In the sample implementation MSDN gave, there is no updating of this column, and IsOnline property is calculated as:

return (now - userIsOnlineTimeWindow > LastActivityDateTime ? false:true);

So what is the purpose of ISONLINE column in the USER table if it's never updated??? Or I am missing out on something???

Thanks

2 Answers 2

2

I also realised this and assumed it was an idea that was never implemented.

Since you have LastActivityDateTime, you can always check that.

2

I seem to remember noticing the same, and concluding that it's probably a 'left-over', ie. not used.

The implementation you quote does the trick well enough, so long as the LastActivityDateTime is updated when appropriate. I guess they just forgot to update the schema.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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