Elgg  Version master
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Elgg\Database\UsersRememberMeCookiesTable Class Reference

Manage the users_remember_me_cookies table. More...

Public Member Functions

 __construct (Database $database)
 Create a new service. More...
 
 insertHash (\ElggUser $user, string $hash)
 Store a hash in the DB. More...
 
 getRowFromHash (string $hash)
 Get the database row for a hash. More...
 
 updateHash (\ElggUser $user, string $hash)
 Update the timestamp of a used hash. More...
 
 deleteHash (string $hash)
 Remove a hash from the DB. More...
 
 deleteAllHashes (\ElggUser $user)
 Remove all the hashes associated with a user. More...
 
 deleteExpiredHashes (int $expiration)
 Remove all expired hashes from the database. More...
 

Public Attributes

const TABLE_NAME = 'users_remember_me_cookies'
 

Protected Attributes

 $database
 

Detailed Description

Manage the users_remember_me_cookies table.

Definition at line 14 of file UsersRememberMeCookiesTable.php.

Constructor & Destructor Documentation

Elgg\Database\UsersRememberMeCookiesTable::__construct ( Database  $database)

Create a new service.

Parameters
Database$databasethe database service

Definition at line 33 of file UsersRememberMeCookiesTable.php.

Member Function Documentation

Elgg\Database\UsersRememberMeCookiesTable::deleteAllHashes ( \ElggUser  $user)

Remove all the hashes associated with a user.

Parameters
\ElggUser$userThe user for whom we're removing hashes
Returns
int

Definition at line 114 of file UsersRememberMeCookiesTable.php.

Elgg\Database\UsersRememberMeCookiesTable::deleteExpiredHashes ( int  $expiration)

Remove all expired hashes from the database.

Parameters
int$expirationthe expiration timestamp
Returns
int

Definition at line 128 of file UsersRememberMeCookiesTable.php.

Elgg\Database\UsersRememberMeCookiesTable::deleteHash ( string  $hash)

Remove a hash from the DB.

Parameters
string$hashThe hashed token to remove
Returns
int

Definition at line 100 of file UsersRememberMeCookiesTable.php.

Elgg\Database\UsersRememberMeCookiesTable::getRowFromHash ( string  $hash)

Get the database row for a hash.

Parameters
string$hashthe hashed token
Returns
|null

Definition at line 67 of file UsersRememberMeCookiesTable.php.

Elgg\Database\UsersRememberMeCookiesTable::insertHash ( \ElggUser  $user,
string  $hash 
)

Store a hash in the DB.

Parameters
\ElggUser$userThe user for whom we're storing the hash
string$hashThe hashed token
Returns
int

Definition at line 45 of file UsersRememberMeCookiesTable.php.

Elgg\Database\UsersRememberMeCookiesTable::updateHash ( \ElggUser  $user,
string  $hash 
)

Update the timestamp of a used hash.

Parameters
\ElggUser$userthe user of the associated hash
string$hashthe hashed token
Returns
bool

Definition at line 83 of file UsersRememberMeCookiesTable.php.

Member Data Documentation

Elgg\Database\UsersRememberMeCookiesTable::$database
protected

Definition at line 26 of file UsersRememberMeCookiesTable.php.

const Elgg\Database\UsersRememberMeCookiesTable::TABLE_NAME = 'users_remember_me_cookies'

Definition at line 21 of file UsersRememberMeCookiesTable.php.


The documentation for this class was generated from the following file: