Base solution for your next web application
Open Closed

Can we see that how long has the user logged in one day #9102


User avatar
0
erkateknoloji created

Hi,

can we see that how long has the user logged in one day? (Kullanıcı bir gün içerisinde ne kadar süre login kalmış?)

  • v7.0.0.0
  • angular
  • .net core

1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can access this information using AuditLogs. You can query for AuditLogs with the filter below;

    (MethodName LIKE '%LogOut%' or MethodName LIKE '%Authenticate%') AND 
    	ServiceName LIKE '%TokenAuthController%' AND 
    	Exception IS NULL
    

    This is for SQL but you can simply write it in LinQ and also add UserId filter to queyr for the user you want to get login duration. After getting records, you can calculate the duration between Authenticate and LogOut logs.