Welcome Guest, Not a member yet? Register   Sign In
Issue Tracking Sessions
#1

Hi,

Im using CI4 v4.2.12 and need to track changes to the session id made by CI regenerating the session ID, keeping the default refresh rate of 300 secs.
When my user logs in I add/update my unique user id and the session id to a table in my database.
I also use a filter to compare the current session id to the session id in the database each time a controller is called. If the two session id's do not match, I log the user out.
This is done for a number of reasons -
  1. I can stop multiple logins by the same user,
  2. I can offer meaningful logout messages to the user (Session Expired/Multiple Logins Detected),
  3. I can easily logout one/all users if necessary.
Therefore, I need to know when CI regenerates the session and I need to know the which session has been regenerated and id of the regenerated session, so I can update the database table.
I have implemented Session DatabaseHandler, but each time CI updates the session, it just adds a new row reflecting the new session, so even from this I cannot identify which user is using which session.
Does CI provide a way to identify when a session has regenerated, which session has been regenerated and, what the regenerate value is??
I should also add, comparing the user IP address not an option for me, as a lot of my users are on the road and are constantly acquiring new IP address on their devices.

Thank you in advance.
Reply


Messages In This Thread
Issue Tracking Sessions - by 68thorby68 - 06-14-2023, 12:10 PM
RE: Issue Tracking Sessions - by kenjis - 06-14-2023, 01:26 PM
RE: Issue Tracking Sessions - by 68thorby68 - 06-15-2023, 02:21 AM
RE: Issue Tracking Sessions - by kenjis - 06-15-2023, 02:31 AM
RE: Issue Tracking Sessions - by 68thorby68 - 06-15-2023, 03:20 AM
RE: Issue Tracking Sessions - by kenjis - 06-15-2023, 04:40 AM
RE: Issue Tracking Sessions - by 68thorby68 - 06-15-2023, 09:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB