Skip to content
English
  • There are no suggestions because the search field is empty.

StaffLoginHistory Table: Field Population and Timestamp Reference

 Overview

This article explains how three fields in the dbo.StaffLoginHistory table are populated and what reference clock is used for their timestamps.

The fields covered are:

  • LoginTime
  • LogoutTime
  • LastRequest

How Fields Are Populated

Entries in StaffLoginHistory are created and maintained by four stored procedures:

  • ssp_SCInsertStaffLoginHistory
  • ssp_GetInstantMessages
  • ssp_SCCheckStaffLoginActive
  • ssp_LogoutFromApplication

On Login

When a user logs in to SmartCare, ssp_SCInsertStaffLoginHistory is called and a new row is created with the following values:

Field Value at Login
LoginTime Current server date and time
LastRequest Current server date and time
LogoutTime NULL

While the Session Is Active

SmartCare periodically calls two stored procedures to monitor active sessions:

ssp_GetInstantMessages Verifies that the logged-in user is still active and has not logged out. If the user remains active, LastRequest is updated with the current server date and time.

ssp_SCCheckStaffLoginActive Evaluates session inactivity based on a calculated threshold. The inactivity threshold (in seconds) is derived from two configuration values:

  • ShowNotificationPollingInterval configuration key
  • PollingTimeDelayPadding (fixed value of 120 seconds)

Examples:

ShowNotificationPollingInterval Value Inactivity Threshold
1 60 seconds
NULL 180 seconds (default)

If the difference between the current server time and the LastRequest value exceeds the inactivity threshold, the system automatically sets LogoutTime to the value of LastRequest. This can occur even if the user did not manually log out.

On Manual Logout

When a user logs out of SmartCare manually, ssp_LogoutFromApplication is called and LogoutTime is updated with the current server date and time.


Timestamp Reference Clock

All timestamps in LoginTime, LogoutTime, and LastRequest are drawn from the server clock and its associated time zone.


Summary
Field Populated By Value
LoginTime ssp_SCInsertStaffLoginHistory Server date/time at login
LastRequest ssp_SCInsertStaffLoginHistory (initial), ssp_GetInstantMessages (ongoing) Server date/time, updated each polling interval
LogoutTime ssp_SCCheckStaffLoginActive (inactivity timeout) or ssp_LogoutFromApplication (manual logout) LastRequest value (timeout) or server date/time (manual logout)