Skip to content

User Model

Wraps the WordPress users table with community-specific relationships and helpers.

Table

  • Table: users
  • Primary key: id
  • Schema ownership: WordPress core table. FluentCommunity reads from it but does not create or migrate it.
  • Extends: Model

Attributes

ColumnTypeNullableDefaultDescription

Relationships

MethodTypeTargetNotes
No relationships are declared on this model.

Scopes

ScopeParametersPurpose
No custom scopes are declared on this model.

Key Methods

MethodDescription
getGeneralData()Builds a normalized profile payload used by controllers and portal views.
cacheAccessSpaces()Caches the set of spaces the user can access to reduce repeated permission lookups.

Usage Examples

php
use FluentCommunityPro\App\Models\User;

$records = User::query()
    
    ->limit(10)
    ->get();

$first = User::query()->first();

FluentCommunity developer documentation