Elgg
Version 6.0
|
Manage the contents of the users_apisessions table. More...
Public Member Functions | |
__construct (protected Database $database, protected Crypto $crypto) | |
Create a new table handler. More... | |
createToken (int $user_guid, int $expires=60) | |
Obtain a token for a user. More... | |
getUserTokens (int $user_guid) | |
Get all tokens attached to a user. More... | |
validateToken (string $token) | |
Validate that a given token is still valid. More... | |
removeToken (string $token) | |
Remove user token. More... | |
removeExpiresTokens () | |
Remove expired tokens. More... | |
Public Attributes | |
const | TABLE_NAME = 'users_apisessions' |
Manage the contents of the users_apisessions table.
Definition at line 15 of file UsersApiSessionsTable.php.
Elgg\Database\UsersApiSessionsTable::__construct | ( | protected Database | $database, |
protected Crypto | $crypto | ||
) |
Create a new table handler.
Definition at line 30 of file UsersApiSessionsTable.php.
Elgg\Database\UsersApiSessionsTable::createToken | ( | int | $user_guid, |
int | $expires = 60 |
||
) |
Obtain a token for a user.
int | $user_guid | the user guid |
int | $expires | minutes until token expires (default is 60 minutes) |
Definition at line 41 of file UsersApiSessionsTable.php.
Elgg\Database\UsersApiSessionsTable::getUserTokens | ( | int | $user_guid | ) |
Get all tokens attached to a user.
int | $user_guid | The user GUID |
Definition at line 62 of file UsersApiSessionsTable.php.
Elgg\Database\UsersApiSessionsTable::removeExpiresTokens | ( | ) |
Remove expired tokens.
Definition at line 107 of file UsersApiSessionsTable.php.
Elgg\Database\UsersApiSessionsTable::removeToken | ( | string | $token | ) |
Remove user token.
string | $token | The token |
Definition at line 95 of file UsersApiSessionsTable.php.
Elgg\Database\UsersApiSessionsTable::validateToken | ( | string | $token | ) |
Validate that a given token is still valid.
string | $token | the token to verify |
Definition at line 77 of file UsersApiSessionsTable.php.
const Elgg\Database\UsersApiSessionsTable::TABLE_NAME = 'users_apisessions' |
Definition at line 22 of file UsersApiSessionsTable.php.