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 UNSIGNEDNo—Primary key for the row.
user_idBIGINT UNSIGNED UNIQUE, cast: integerNo—WordPress user ID associated with the row.
total_pointsINT(11) UNSIGNED, cast: integerNo0Accumulated profile points used for rankings and badges.
usernameVARCHAR(100)Yes—Profile 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)Yes—Public display name shown in the portal.
avatarTEXTYes—Avatar URL for the profile or user.
short_descriptionTEXTYes—Short biographical text or intro.
last_activityDATETIMEYes—Timestamp of the last tracked user activity.
metaLONGTEXTYes—Serialized meta payload used by FluentCommunity.
created_atTIMESTAMPYes—Creation timestamp maintained by the ORM.
updated_atTIMESTAMPYes—Update 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