MemberVerification
Reference for the MemberVerification module: record and read immutable verification results linking a member to a row of some other module's table. Verifications are append-only; the latest record by id wins. Any module registers its own verification types up front, then saves outcomes and reads back status, counts and timestamps.
This page is a pure reference. For how the framework fits together, see the Guide.
MemberVerificationDatabase- save and read immutable verification records.MemberVerificationConfig- register and look up verification types.MemberVerificationData- immutable data for one verification record.MemberVerificationTypeData- immutable data for a registered verification type.VerificationSummaryData- immutable status summary for display.
MemberVerificationDatabase
Save and read verification records. Records are immutable: every save inserts a new row, and reads take the latest by id. Provides single lookups, bulk lookups keyed by entity or member id, counts, the latest verified timestamp, and filtered paged lists.
fromRow
MemberVerificationDatabase::fromRow(stdClass $row): MemberVerificationData
Convert a database row into a MemberVerificationData object.
| Name | Type | Description |
|---|---|---|
$row | stdClass | A row from the member_verification table. |
Returns MemberVerificationData The record.
GetById
MemberVerificationDatabase::GetById(int $verificationId): MemberVerificationData
Get a verification record by its id.
| Name | Type | Description |
|---|---|---|
$verificationId | int | The verification record id. |
Returns MemberVerificationData The record.
GetCountsByEntityIDs
MemberVerificationDatabase::GetCountsByEntityIDs(string $moduleName, string $verificationName, string $tableName, array $tableRowIds): array
Count verification records for many entity ids at once, for a given verification type and table.
| Name | Type | Description |
|---|---|---|
$moduleName | string | The module that registered the verification type. |
$verificationName | string | The verification type name. |
$tableName | string | The entity table name. |
$tableRowIds | array | The entity row ids to count for. |
Returns array A map of table row id to count.
GetOptionalVerifiedTimestamp
MemberVerificationDatabase::GetOptionalVerifiedTimestamp(string $moduleName, string $verificationName, int $tableRowId): CalendarDateTimeData|null
The timestamp of the latest verified record for an entity, or null if it was never verified.
| Name | Type | Description |
|---|---|---|
$moduleName | string | The module that registered the verification type. |
$verificationName | string | The verification type name. |
$tableRowId | int | The entity row id. |
Returns CalendarDateTimeData|null The latest verified timestamp, or null.
GetOverallStatusesByMemberIDs
MemberVerificationDatabase::GetOverallStatusesByMemberIDs(array $memberIds): array
The latest overall verification status for many members at once, where null means no record, true means verified and false means unverified.
| Name | Type | Description |
|---|---|---|
$memberIds | array | The member ids to look up. |
Returns array A map of member id to true, false or null.
GetStatusesByEntityIDs
MemberVerificationDatabase::GetStatusesByEntityIDs(string $moduleName, string $verificationName, string $tableName, array $tableRowIds): array
The latest verified status for many entity ids at once, for a given verification type and table.
| Name | Type | Description |
|---|---|---|
$moduleName | string | The module that registered the verification type. |
$verificationName | string | The verification type name. |
$tableName | string | The entity table name. |
$tableRowIds | array | The entity row ids to look up. |
Returns array A map of table row id to verified boolean.
IsVerified
MemberVerificationDatabase::IsVerified(int $memberId, string $moduleName, string $verificationName, int $tableRowId): bool
Whether the latest record for a member, verification type and entity is verified. Returns false when no record exists.
| Name | Type | Description |
|---|---|---|
$memberId | int | The member id. |
$moduleName | string | The module that registered the verification type. |
$verificationName | string | The verification type name. |
$tableRowId | int | The entity row id. |
Returns bool True when the latest record is verified.
ListFiltered
MemberVerificationDatabase::ListFiltered(int $memberId, string $moduleName, string $verificationName, int $tableRowId, int $page, int $perPage): array
List verification records with optional filtering and pagination. Pass 0 for an id filter or an empty string for a name filter to skip it.
| Name | Type | Description |
|---|---|---|
$memberId | int | Filter by member id, or 0 for no filter. |
$moduleName | string | Filter by module name, or empty for no filter. |
$verificationName | string | Filter by verification name, or empty for no filter. |
$tableRowId | int | Filter by entity row id, or 0 for no filter. |
$page | int | The page number, starting at 1. |
$perPage | int | The number of rows per page. |
Returns array A map with rows (an array of MemberVerificationData) and total (the match count).
Save
MemberVerificationDatabase::Save(int $memberId, string $moduleName, string $verificationName, string $tableName, int $tableRowId, bool $verified, string|null $optionalNote = null): int
Save a new verification record. Always inserts a new row, since records are immutable. Returns the new record id.
| Name | Type | Description |
|---|---|---|
$memberId | int | The member the verification is for. |
$moduleName | string | The module that registered the verification type. |
$verificationName | string | The verification type name. |
$tableName | string | The entity table name. |
$tableRowId | int | The entity row id. |
$verified | bool | The verification outcome. |
$optionalNote | string|null | An optional note, or null. |
Returns int The new verification record id.
MemberVerificationConfig
Register the verification types a module supports, then look them up by module and name or by table name. Each type binds a display name, an entity table and its id column.
Get
MemberVerificationConfig::Get(string $moduleName, string $verificationName): MemberVerificationTypeData
Get a registered verification type by module and name. Throws when the type is unknown.
| Name | Type | Description |
|---|---|---|
$moduleName | string | The module that registered the type. |
$verificationName | string | The verification type name. |
Returns MemberVerificationTypeData The registered type.
GetAll
MemberVerificationConfig::GetAll(): array
Every registered verification type, keyed by module and name.
Returns array A map of key to MemberVerificationTypeData.
GetByTableName
MemberVerificationConfig::GetByTableName(string $tableName): array
Every registered verification type whose table name matches the given one.
| Name | Type | Description |
|---|---|---|
$tableName | string | The entity table name to filter by. |
Returns array A map of key to MemberVerificationTypeData.
Register
MemberVerificationConfig::Register(string $moduleName, string $verificationName, string $displayName, string $tableName, string $idColumn): void
Register a verification type for a module, binding a display name, an entity table and its id column.
| Name | Type | Description |
|---|---|---|
$moduleName | string | The module registering the type. |
$verificationName | string | The verification type name. |
$displayName | string | The human-readable name. |
$tableName | string | The entity table name. |
$idColumn | string | The entity id column name. |
Returns void
MemberVerificationData
Immutable data for one verification record. Fields and constructor only.
Properties
| Property | Type | Description |
|---|---|---|
$verification->id | int | The record id (readonly). |
$verification->memberId | int | The member the record is for (readonly). |
$verification->moduleName | string | The module that registered the type (readonly). |
$verification->verificationName | string | The verification type name (readonly). |
$verification->tableName | string | The entity table name (readonly). |
$verification->tableRowId | int | The entity row id (readonly). |
$verification->verified | bool | The verification outcome (readonly). |
$verification->optionalNote | string|null | An optional note, or null (readonly). |
$verification->addedTimestamp | CalendarDateTimeData | When the record was added (readonly). |
$verification->addedDate | string | The date the record was added (readonly). |
__construct
new MemberVerificationData(int $id = 0, int $memberId = 0, string $moduleName = '', string $verificationName = '', string $tableName = '', int $tableRowId = 0, bool $verified = false, string|null $optionalNote = null, CalendarDateTimeData $addedTimestamp = new CalendarDateTimeData(), string $addedDate = '')
Create a verification record data object.
| Name | Type | Description |
|---|---|---|
$id | int | The record id. |
$memberId | int | The member the record is for. |
$moduleName | string | The module that registered the type. |
$verificationName | string | The verification type name. |
$tableName | string | The entity table name. |
$tableRowId | int | The entity row id. |
$verified | bool | The verification outcome. |
$optionalNote | string|null | An optional note, or null. |
$addedTimestamp | CalendarDateTimeData | When the record was added. |
$addedDate | string | The date the record was added. |
Returns MemberVerificationData
MemberVerificationTypeData
Immutable data for a registered verification type. Fields and constructor only.
Properties
| Property | Type | Description |
|---|---|---|
$type->moduleName | string | The module that registered the type (readonly). |
$type->verificationName | string | The verification type name (readonly). |
$type->displayName | string | The human-readable name (readonly). |
$type->tableName | string | The entity table name (readonly). |
$type->idColumn | string | The entity id column name (readonly). |
__construct
new MemberVerificationTypeData(string $moduleName = '', string $verificationName = '', string $displayName = '', string $tableName = '', string $idColumn = '')
Create a verification type data object.
| Name | Type | Description |
|---|---|---|
$moduleName | string | The module that registered the type. |
$verificationName | string | The verification type name. |
$displayName | string | The human-readable name. |
$tableName | string | The entity table name. |
$idColumn | string | The entity id column name. |
Returns MemberVerificationTypeData
VerificationSummaryData
Immutable status summary for display. Fields and constructor only.
Properties
| Property | Type | Description |
|---|---|---|
$summary->statusType | string | The status type (readonly). |
$summary->statusMessage | string | The status message (readonly). |
$summary->shortText | string | A short summary text (readonly). |
__construct
new VerificationSummaryData(string $statusType = 'info', string $statusMessage = '', string $shortText = '')
Create a verification status summary data object.
| Name | Type | Description |
|---|---|---|
$statusType | string | The status type. |
$statusMessage | string | The status message. |
$shortText | string | A short summary text. |
Returns VerificationSummaryData