RecoveryCodesTable extends DataManager
Class RecoveryCodesTable
DO NOT WRITE ANYTHING BELOW THIS
<<< ORMENTITYANNOTATION
Table of Contents
Constants
- CODE_PATTERN = '#^[a-z0-9]{4}-[a-z0-9]{4}$#D'
- CODES_PER_USER = 10
Methods
- clearByUser() : bool
- Clear all saved recovery codes for provided user
- createCollection() : EO_RecoveryCodes_Collection
- createObject() : EO_RecoveryCodes
- getById() : EO_RecoveryCodes_Result
- getByPrimary() : EO_RecoveryCodes_Result
- getEntity() : EO_RecoveryCodes_Entity
- getList() : EO_RecoveryCodes_Result
- getMap() : array<string|int, mixed>
- {@inheritdoc}
- getTableName() : string
- {@inheritdoc}
- query() : EO_RecoveryCodes_Query
- regenerateCodes() : bool
- Generate new recovery codes for provided user Previously generated codes will be removed
- useCode() : bool
- Use recovery code for user
- wakeUpCollection() : EO_RecoveryCodes_Collection
- wakeUpObject() : EO_RecoveryCodes
Constants
CODE_PATTERN
public
mixed
CODE_PATTERN
= '#^[a-z0-9]{4}-[a-z0-9]{4}$#D'
CODES_PER_USER
public
mixed
CODES_PER_USER
= 10
Methods
clearByUser()
Clear all saved recovery codes for provided user
public
static clearByUser(int $userId) : bool
Parameters
- $userId : int
-
Needed user id.
Tags
Return values
bool —Returns true if successful
createCollection()
public
static createCollection() : EO_RecoveryCodes_Collection
Return values
EO_RecoveryCodes_CollectioncreateObject()
public
static createObject([mixed $setDefaultValues = = 'true' ]) : EO_RecoveryCodes
Parameters
- $setDefaultValues : mixed = = 'true'
Return values
EO_RecoveryCodesgetById()
public
static getById(mixed $id) : EO_RecoveryCodes_Result
Parameters
- $id : mixed
Return values
EO_RecoveryCodes_ResultgetByPrimary()
public
static getByPrimary(mixed $primary[, array<string|int, mixed> $parameters = = '[]' ]) : EO_RecoveryCodes_Result
Parameters
- $primary : mixed
- $parameters : array<string|int, mixed> = = '[]'
Return values
EO_RecoveryCodes_ResultgetEntity()
public
static getEntity() : EO_RecoveryCodes_Entity
Return values
EO_RecoveryCodes_EntitygetList()
public
static getList([array<string|int, mixed> $parameters = = '[]' ]) : EO_RecoveryCodes_Result
Parameters
- $parameters : array<string|int, mixed> = = '[]'
Return values
EO_RecoveryCodes_ResultgetMap()
{@inheritdoc}
public
static getMap() : array<string|int, mixed>
Return values
array<string|int, mixed>getTableName()
{@inheritdoc}
public
static getTableName() : string
Return values
stringquery()
public
static query() : EO_RecoveryCodes_Query
Return values
EO_RecoveryCodes_QueryregenerateCodes()
Generate new recovery codes for provided user Previously generated codes will be removed
public
static regenerateCodes(int $userId) : bool
Parameters
- $userId : int
-
Needed user id.
Tags
Return values
bool —Returns true if successful
useCode()
Use recovery code for user
public
static useCode(int $userId, string $searchCode) : bool
Parameters
- $userId : int
-
Needed user id.
- $searchCode : string
-
Recovery code in accepted format (see RecoveryCodesTable::CODE_PATTERN).
Tags
Return values
bool —Returns true if successful
wakeUpCollection()
public
static wakeUpCollection(mixed $rows) : EO_RecoveryCodes_Collection
Parameters
- $rows : mixed
Return values
EO_RecoveryCodes_CollectionwakeUpObject()
public
static wakeUpObject(mixed $row) : EO_RecoveryCodes
Parameters
- $row : mixed