JTableSession

Extends \JTable

Session table

deprecated
since

1.5

deprecated

3.2 Use SQL queries to interact with the session table.

package

Joomla.Legacy

Methods

__construct

Constructor

__construct(\JDatabaseDriver $db) 
deprecated
since

1.5

deprecated

3.2 Use SQL queries to interact with the session table.

Arguments

$db

\JDatabaseDriverDatabase driver object.

delete

Overloaded delete method

delete(integer $oid = null) : mixed
deprecated

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

integerThe object id (optional).

Response

mixedTrue if successful otherwise an error message

destroy

Destroys the pre-existing session

destroy(integer $userId, array $clientIds = array()) : boolean
deprecated
since

1.5

deprecated

3.2 Use SQL queries to interact with the session table.

Arguments

$userId

integerIdentifier of the user for this session.

$clientIds

arrayArray of client ids for which session(s) will be destroyed

Response

booleanTrue on success.

exists

Find out if a user has one or more active sessions

exists(integer $userid) : boolean
deprecated
since

1.5

deprecated

3.2 Use SQL queries to interact with the session table.

Arguments

$userid

integerThe identifier of the user

Response

booleanTrue if a session for this user exists

insert

Insert a session

insert(string $sessionId, integer $clientId) : boolean
deprecated
since

1.5

deprecated

3.2 Use SQL queries to interact with the session table.

Arguments

$sessionId

stringThe session id

$clientId

integerThe id of the client application

Response

booleanTrue on success

purge

Purge old sessions

purge(integer $maxLifetime = 1440) : mixed
deprecated
since

1.5

deprecated

3.2 Use SQL queries to interact with the session table.

Arguments

$maxLifetime

integerSession age in seconds

Response

mixedResource on success, null on fail

update

Updates the session

update(boolean $updateNulls = false) : boolean
deprecated
since

1.5

deprecated

3.2 Use SQL queries to interact with the session table.

Arguments

$updateNulls

booleanTrue to update fields even if they are null.

Response

booleanTrue on success.