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

Goran
  • 1,807
  • 7
  • 27
  • 41

2 Answers2

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.

Tor Haugen
  • 19,509
  • 9
  • 45
  • 63
2

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

Since you have LastActivityDateTime, you can always check that.

Mark Redman
  • 24,079
  • 20
  • 92
  • 147