← Back to Member Lifecycle

4.1.1 MembersTable Reference

This page is intentionally a maintenance reference, not a copy of the class API. Read app/src/Model/Table/MembersTable.php and the generated API documentation for exact signatures.

Responsibility

MembersTable extends BaseTable and owns persistence rules for tenant-local members. It configures associations, validation, soft deletion, audit fields, JSON fields, public IDs, and save-time lifecycle reviews.

Important associations

Association Purpose
Branches Home branch
Parents Parent/guardian relationship for minors
Roles / MemberRoles Role assignments and active windows
CurrentMemberRoles Currently active assignments
UpcomingMemberRoles Future assignments
PreviousMemberRoles Ended assignments
ProfilePhoto Current profile-photo document
MembershipCard Current membership-card document
GatheringAttendances Event attendance/RSVP records
MemberQuickLoginDevices Registered quick-login devices

Behaviors and hooks

MembersTable uses timestamp, footprint, trash, JSON-field, and public-ID behaviors. Its beforeSave() hook calls Member::ageUpReview() and Member::warrantableReview(). Preserve that path when importing or updating members.

getValidationQueueCount() is the shared count for membership/minor verification work. Do not duplicate its status predicate in navigation code.

Authorization and tenancy

Table validation does not replace authorization. Controllers must authorize operations and apply the relevant table scope before listing or exporting members. The table uses the active tenant’s default connection; callers outside a request must first establish TenantContext through the supported tenant connection runner.

Safe extension checklist