Welcome Guest, Not a member yet? Register   Sign In
Extend CI_Session_database_driver to work with extra cols in ci_sessions table
#1

(This post was last modified: 08-19-2015, 12:08 PM by jLinux.)

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!
Reply


Messages In This Thread
Extend CI_Session_database_driver to work with extra cols in ci_sessions table - by jLinux - 08-19-2015, 11:14 AM
RE: Extra column in sessions table - by Narf - 08-19-2015, 11:20 AM
RE: Extra column in sessions table - by jLinux - 08-19-2015, 11:33 AM
RE: Extra column in sessions table - by jLinux - 08-19-2015, 12:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB