Neuron-PHP

CleanupExpiredTokensJob extends MaintenanceJob
in package

Deletes expired email verification and password reset tokens.

Both token tables retain rows until they are explicitly removed; tokens are only deleted on use, so expired but unused tokens accumulate. This job purges any token whose expires_at is in the past.

Table of Contents

Methods

getName()  : string
run()  : bool
Purge expired auth tokens.
getBasePath()  : string|null
Resolve the application base path from the Registry.
getConnection()  : PDO|null
Build a PDO connection from the application database settings.
getSettings()  : SettingManager|null
Resolve the application SettingManager from the Registry.
intArg()  : int
Read an integer argument with a default fallback.

Methods

run()

Purge expired auth tokens.

public run([array<string|int, mixed> $argv = [] ]) : bool
Parameters
$argv : array<string|int, mixed> = []
Return values
bool

True on success.

getBasePath()

Resolve the application base path from the Registry.

protected getBasePath() : string|null
Return values
string|null

getConnection()

Build a PDO connection from the application database settings.

protected getConnection() : PDO|null
Return values
PDO|null

Null when the connection cannot be established.

intArg()

Read an integer argument with a default fallback.

protected intArg(array<string|int, mixed> $argv, string $key, int $default) : int
Parameters
$argv : array<string|int, mixed>
$key : string
$default : int
Return values
int
On this page

Search results