JTableSession
Extends \JTableSession table
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
package |
Joomla.Legacy |
Methods
__construct
Constructor
__construct(\JDatabaseDriver $db)
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
Arguments
- $db
\JDatabaseDriver
Database driver object.
delete
Overloaded delete method
delete(integer $oid = null) : mixed
We must override it because of the non-integer primary key
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
Arguments
- $oid
integer
The object id (optional).
Response
mixed
True if successful otherwise an error message
destroy
Destroys the pre-existing session
destroy(integer $userId, array $clientIds = array()) : boolean
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
Arguments
- $userId
integer
Identifier of the user for this session.- $clientIds
array
Array of client ids for which session(s) will be destroyed
Response
boolean
True on success.
exists
Find out if a user has one or more active sessions
exists(integer $userid) : boolean
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
Arguments
- $userid
integer
The identifier of the user
Response
boolean
True if a session for this user exists
insert
Insert a session
insert(string $sessionId, integer $clientId) : boolean
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
Arguments
- $sessionId
string
The session id- $clientId
integer
The id of the client application
Response
boolean
True on success
purge
Purge old sessions
purge(integer $maxLifetime = 1440) : mixed
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
Arguments
- $maxLifetime
integer
Session age in seconds
Response
mixed
Resource on success, null on fail
update
Updates the session
update(boolean $updateNulls = false) : boolean
since |
1.5 |
---|---|
deprecated |
3.2 Use SQL queries to interact with the session table. |
Arguments
- $updateNulls
boolean
True to update fields even if they are null.
Response
boolean
True on success.