Skip to content

XProfile Model

Stores public-facing profile fields, status, verification, and community profile metadata.

Table

  • Table: fcom_xprofile

  • Primary key: user_id

  • Extends: Model

Attributes

ColumnTypeNullableDefaultDescription
idBIGINT UNSIGNEDNoPrimary key for the row.
user_idBIGINT UNSIGNED UNIQUE, cast: integerNoWordPress user ID associated with the row.
total_pointsINT(11) UNSIGNED, cast: integerNo0Accumulated profile points used for rankings and badges.
usernameVARCHAR(100)YesProfile username or WordPress username alias.
statusenum('active', 'blocked', 'pending')No'active'Lifecycle or moderation status.
is_verifiedTINYINT(1) UNSIGNED, cast: integerNo0Is Verified stored for this record.
display_nameVARCHAR(192)YesPublic display name shown in the portal.
avatarTEXTYesAvatar URL for the profile or user.
short_descriptionTEXTYesShort biographical text or intro.
last_activityDATETIMEYesTimestamp of the last tracked user activity.
metaLONGTEXTYesSerialized meta payload used by FluentCommunity.
created_atTIMESTAMPYesCreation timestamp maintained by the ORM.
updated_atTIMESTAMPYesUpdate timestamp maintained by the ORM.

Relationships

MethodTypeTargetNotes
user()belongsToUserSignature:
contact()hasOneContactSignature:
spaces()belongsToManyBaseSpaceSignature:
posts()hasManyFeedSignature:
follows()hasManyFollowSignature:
followers()hasManyFollowSignature:
comments()hasManyCommentSignature:
courses()belongsToManyCourseSignature:
space_pivot()belongsToSpaceUserPivotSignature:
community_role()belongsToMetaSignature:

Scopes

ScopeParametersPurpose
SearchBy$query, $searchSearch By scope declared on the model.
MentionBy$query, $searchMention By scope declared on the model.

Key Methods

MethodDescription
hasCustomAvatar()Returns whether the profile has an explicitly assigned avatar URL.
getPermalink()Builds the canonical portal profile URL for the user.
scheduledPosts()scheduled Posts implemented on the model.

Usage Examples

php
use FluentCommunity\App\Models\XProfile;

$records = XProfile::query()
    ->searchBy('example')
    ->limit(10)
    ->get();

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

FluentCommunity developer documentation