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

Manage the users_remember_me_cookies table. More...

Public Member Functions

 __construct (protected 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'
 

Detailed Description

Manage the users_remember_me_cookies table.

Definition at line 14 of file UsersRememberMeCookiesTable.php.

Constructor & Destructor Documentation

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

Create a new service.

Parameters
Database$databasethe database service

Definition at line 28 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 108 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 122 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 94 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 61 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 39 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 77 of file UsersRememberMeCookiesTable.php.

Member Data Documentation

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: