I was wondering if there was a way to add some extra custom data to an extra field in the
ci_sessions table (when stored in database), I know you can set custom data using
set_userdata(), which gets stored as BLOB format in the data column of the
ci_sessions table, but I wanted to associate each session with an account ID. Which can be done in the session data, but i wanted to be able to execute a query to show all active sessions associated to an
account_id.
I know it can be done with a new table used to associate accounts to sessions, but I was hoping to use the existing table, since it clears the records out when the session is over. Id have to find a way to do the same thing with the association table.
Currently, I have a column in the
accounts table that references the session ID, which works fine, as long as the account never has more than one session, I wanted to add some functionality that would show you how many active sessions your account has open in other locations when you login.
Thanks!