MetaFox

User extends User
in package
implements User, PrivacyList, IsActivitySubscriptionInterface, ActivityFeedSource, IsPrivacyItemInterface, PostBy, LdapAuthenticatable, IsNotifiable, HasUserProfile, UserHasValuePermission, CanResetPassword, HasGlobalSearch, HasTimelineAlbum, HasApprove, HasFeature Uses Notifiable, HasApiTokens, HasRoles, HasNestedAttributes, HasFactory, AuthenticatesWithLdap, UserHasValuePermissionTrait, CanResetPasswordTrait, HasUser, MustVerify

Class User.

Tags
mixin

Builder

SuppressWarnings

(PHPMD.CouplingBetweenObjects)

SuppressWarnings

(PHPMD.CamelCasePropertyName)

Table of Contents

Interfaces

User
Interface User.
PrivacyList
Interface Entity.
IsActivitySubscriptionInterface
ActivityFeedSource
Interface ActivityFeedSource.
IsPrivacyItemInterface
PostBy
LdapAuthenticatable
IsNotifiable
Interface IsNotifiable.
HasUserProfile
Interface HasUserProfile.
UserHasValuePermission
CanResetPassword
HasGlobalSearch
Interface HasGlobalSearch.
HasTimelineAlbum
Interface HasTimelineAlbum
HasApprove
Interface HasApprove
HasFeature
Interface HasFeature.

Constants

ENTITY_TYPE  = 'user'
USER_AVATAR_SIGN_UP  = 'user_signup_avatar'
USER_UPDATE_AVATAR_ENTITY_TYPE  = 'user_update_avatar'
USER_UPDATE_COVER_ENTITY_TYPE  = 'user_update_cover'
USER_UPDATE_INFORMATION_ENTITY_TYPE  = 'user_update_information'
USER_UPDATE_RELATIONSHIP_ENTITY_TYPE  = 'user_update_relationship'
DEFAULT_TAB_ABOUT  = 'about'
DEFAULT_TAB_HOME  = 'home'

Properties

$approve_status  : string
$created_at  : string
$email  : string
$email_verified_at  : mixed|null
$first_name  : string|null
$full_name  : string
$full_name_raw  : string
$id  : int
$incrementing  : mixed
$is_approved  : int
$is_featured  : bool
$is_invisible  : bool
$last_name  : string|null
$nestedAttributes  : array<string|int, mixed>
$password  : string
$phone_number  : string
$phone_number_verified_at  : mixed|null
$profile  : UserProfile
$total_friend  : int
$updated_at  : string
$user_name  : string
$userActivity  : UserActivity
$verified_at  : mixed|null
$casts  : array<string, string>
The attributes that should be cast to native types.
$fillable  : array<string|int, string>
The attributes that are mass assignable.
$guard_name  : string
This is use for roles, permissions. Please do not remove this.
$hidden  : array<string|int, string>
The attributes that should be hidden for arrays.
$nestedAttributesFor  : array<string|int, mixed>
Defined nested attributes.

Methods

canBeBlocked()  : bool
Determine if resource can be blocked.
checkContentShareable()  : bool
checkPostBy()  : bool
customProfile()  : array<string|int, mixed>
entityId()  : int
entityType()  : string
factory()  : UserFactory
fill()  : static
Fill the model with an array of attributes.
findForPassport()  : User|null
Find the user instance for the given username.
getApprovedMessage()  : string|null
getDeclinedMessage()  : string|null
getDefaultTabMenu()  : string
getDescriptionAttribute()  : mixed
getEmailOptionForPasswordReset()  : array<string|int, mixed>|null
getFullNameAttribute()  : string
getFullNameRawAttribute()  : string
getItemPrivacy()  : int|null
getNestedAttributesFor()  : array<string|int, mixed>
Get accept nested attributes.
getOwnerAttribute()  : mixed
getOwnerEntityAttribute()  : mixed
getPendingMessage()  : string|null
getPhoneNumberOptionForPasswordReset()  : array<string|int, mixed>|null
getPrivacyPostBy()  : int
Get privacy base on owner's requirement Page => 0 (public) Group => privacy_item User => 1 (friend).
getProfileAttribute()  : mixed
getRepresentativePrivacy()  : int|null
getRepresentativePrivacyDetail()  : array<string|int, mixed>|null
getResetMethods()  : array<string|int, mixed>
getRole()  : Role|null
getSharedFeedAvatarTypeIdAttribute()  : string
getSharedFeedCoverTypeIdAttribute()  : string
getSmallestRoleId()  : int
getTotalCommentAttribute()  : int
getTotalReplyAttribute()  : int
getUserAttribute()  : mixed
getUserDescription()  : string
getUserEntityAttribute()  : mixed
hasAdminRole()  : bool
hasContentPrivacy()  : bool
hasEmailAddress()  : bool
Check if the user has an associated email address.
hasFeedDetailPage()  : bool
hasNamedNotification()  : null|string
hasPendingMode()  : bool
hasPermissionValue()  : bool
hasPhoneNumber()  : bool
Check if the user has an associated phone number.
hasRemoveFeed()  : bool
hasRole()  : bool
hasStaffRole()  : bool
hasSuperAdminRole()  : bool
hasValuePermissionViaRole()  : bool
hasVerified()  : bool
Determine if the user has verified their account.
isApproved()  : bool
isDeleted()  : bool
isGuest()  : bool
isNotApproved()  : bool
isPendingMode()  : bool|null
isTaggingAllowed()  : bool
markAsVerified()  : void
Mark the user as verified.
mustVerify()  : bool
Check whether the user needs to verify their registered email / phone number.
mustVerifyEmailAddress()  : bool
Check whether the user needs to verify their email address.
mustVerifyPhoneNumber()  : bool
Check whether the user needs to verify their phone number.
notificationEmail()  : string
notificationFullName()  : string
notificationPhoneNumber()  : string
notificationUserName()  : string
notify()  : void
Send the given notification.
notifyNow()  : void
Send the given notification immediately.
owner()  : mixed
ownerEntity()  : mixed
ownerId()  : int
ownerType()  : string
preferredLocale()  : string|null
profile()  : HasOne
resetTokens()  : HasMany
revokeAllTokens()  : void
routeNotificationFor()  : mixed
Get the notification routing information for the given driver.
save()  : bool
Save the model to the database.
sendPasswordResetNotification()  : void
Send the password reset notification.
sendPasswordResetToken()  : void
shouldVerifyEmailAddress()  : bool
Check whether the user should to verify their email address.
shouldVerifyPhoneNumber()  : bool
Check whether the user should to verify their phone number.
syncHasManyRelationAttribute()  : bool
Save the hasMany nested relation attributes to the database.
syncHasOneRelationAttribute()  : bool
toActivityFeed()  : FeedAction|null
toActivitySubscription()  : array<string|int, int>
This method must return [$userId, $ownerId] $userId: who subscribe $ownerId: whom subscribe from When $owner post content on profile, $userId can see $owner feed.
toApprovedNotification()  : array<string|int, mixed>
toDeclinedContentLink()  : string|null
toDeclinedContentUrl()  : string|null
toLink()  : string|null
toOGDescription()  : string|null
toPaymentSettingUrl()  : string
toPrivacyItem()  : array<string|int, mixed>
Result [ [$userId, $itemId, $itemType, $privacyType] ] $userId: to Insert into privacy_data $itemId: $itemType, $privacyType: to find privacy_id.
toPrivacyLists()  : array<string|int, mixed>
toRouter()  : string|null
toSearchable()  : array<string|int, mixed>|null
toSitemapUrl()  : string|null
toTitle()  : string
toUrl()  : string|null
toUserResource()  : array<string, mixed>
transformRole()  : string
user()  : mixed
userActivity()  : HasOne
userEntity()  : mixed
userId()  : int
userType()  : string
validateForPassportPasswordGrant()  : bool
validatePassword()  : bool
allowDestroyNestedAttributes()  : bool
Check can we delete nested data.
newFactory()  : UserFactory
normalizeRoles()  : array<string|int, mixed>

Constants

ENTITY_TYPE

public mixed ENTITY_TYPE = 'user'

USER_AVATAR_SIGN_UP

public mixed USER_AVATAR_SIGN_UP = 'user_signup_avatar'

USER_UPDATE_AVATAR_ENTITY_TYPE

public mixed USER_UPDATE_AVATAR_ENTITY_TYPE = 'user_update_avatar'

USER_UPDATE_COVER_ENTITY_TYPE

public mixed USER_UPDATE_COVER_ENTITY_TYPE = 'user_update_cover'

USER_UPDATE_INFORMATION_ENTITY_TYPE

public mixed USER_UPDATE_INFORMATION_ENTITY_TYPE = 'user_update_information'

USER_UPDATE_RELATIONSHIP_ENTITY_TYPE

public mixed USER_UPDATE_RELATIONSHIP_ENTITY_TYPE = 'user_update_relationship'

DEFAULT_TAB_ABOUT

protected mixed DEFAULT_TAB_ABOUT = 'about'

DEFAULT_TAB_HOME

protected mixed DEFAULT_TAB_HOME = 'home'

Properties

$approve_status

public string $approve_status

$created_at

public string $created_at

$email

public string $email

$email_verified_at

public mixed|null $email_verified_at

$first_name

public string|null $first_name

$full_name

public string $full_name

$full_name_raw

public string $full_name_raw

$incrementing

public mixed $incrementing = false

$is_approved

public int $is_approved
public bool $is_featured

$is_invisible

public bool $is_invisible

$last_name

public string|null $last_name

$nestedAttributes

public array<string|int, mixed> $nestedAttributes = ['profile']

$password

public string $password

$phone_number

public string $phone_number

$phone_number_verified_at

public mixed|null $phone_number_verified_at

$total_friend

public int $total_friend

$updated_at

public string $updated_at

$user_name

public string $user_name

$verified_at

public mixed|null $verified_at

$casts

The attributes that should be cast to native types.

protected array<string, string> $casts = ['email_verified_at' => 'datetime', 'is_featured' => 'boolean', 'is_invisible' => 'boolean']

$fillable

The attributes that are mass assignable.

protected array<string|int, string> $fillable = ['id', 'user_name', 'full_name', 'first_name', 'last_name', 'total_friend', 'email', 'phone_number', 'password', 'is_featured', 'is_invisible', 'approve_status', 'updated_at', 'deleted_at', 'email_verified_at', 'phone_number_verified_at', 'verified_at']

$guard_name

This is use for roles, permissions. Please do not remove this.

protected string $guard_name = 'api'

$hidden

The attributes that should be hidden for arrays.

protected array<string|int, string> $hidden = ['password', 'remember_token']

$nestedAttributesFor

Defined nested attributes.

protected array<string|int, mixed> $nestedAttributesFor = []

Methods

canBeBlocked()

Determine if resource can be blocked.

public canBeBlocked() : bool
Return values
bool

checkContentShareable()

public checkContentShareable(User $user[, Content $content = null ]) : bool
Parameters
$user : User
$content : Content = null
Tags
inheritDoc
Return values
bool

checkPostBy()

public checkPostBy(User $user[, Content $content = null ]) : bool
Parameters
$user : User
$content : Content = null
Return values
bool

customProfile()

public customProfile() : array<string|int, mixed>
Return values
array<string|int, mixed>

Get custom profile value

entityId()

public entityId() : int
Return values
int

entityType()

public entityType() : string
Return values
string

factory()

public static factory(mixed $parameters) : UserFactory
Parameters
$parameters : mixed
Return values
UserFactory

fill()

Fill the model with an array of attributes.

public fill(array<string|int, mixed> $attributes) : static
Parameters
$attributes : array<string|int, mixed>
Tags
throws
MassAssignmentException
Return values
static

findForPassport()

Find the user instance for the given username.

public findForPassport(string $username) : User|null

Can login by user_name, email Laravel/passport feature. Do not remove this.

Parameters
$username : string
Tags
throws
AuthorizationException
throws
ValidateUserException
Return values
User|null

getApprovedMessage()

public getApprovedMessage() : string|null
Return values
string|null

getDeclinedMessage()

public getDeclinedMessage() : string|null
Return values
string|null

getDefaultTabMenu()

public getDefaultTabMenu() : string
Return values
string

getDescriptionAttribute()

public getDescriptionAttribute() : mixed

getEmailOptionForPasswordReset()

public getEmailOptionForPasswordReset() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getFullNameAttribute()

public getFullNameAttribute(string|null $value) : string
Parameters
$value : string|null
Return values
string

getFullNameRawAttribute()

public getFullNameRawAttribute() : string
Return values
string

getItemPrivacy()

public getItemPrivacy() : int|null
Return values
int|null

getNestedAttributesFor()

Get accept nested attributes.

public getNestedAttributesFor() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOwnerAttribute()

public getOwnerAttribute() : mixed

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

getPendingMessage()

public getPendingMessage() : string|null
Return values
string|null

getPhoneNumberOptionForPasswordReset()

public getPhoneNumberOptionForPasswordReset() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getPrivacyPostBy()

Get privacy base on owner's requirement Page => 0 (public) Group => privacy_item User => 1 (friend).

public getPrivacyPostBy() : int
Return values
int

getProfileAttribute()

public getProfileAttribute() : mixed

getRepresentativePrivacy()

public getRepresentativePrivacy() : int|null
Return values
int|null

getRepresentativePrivacyDetail()

public getRepresentativePrivacyDetail(int $privacy) : array<string|int, mixed>|null
Parameters
$privacy : int
Return values
array<string|int, mixed>|null

getResetMethods()

public getResetMethods() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getSharedFeedAvatarTypeIdAttribute()

public getSharedFeedAvatarTypeIdAttribute() : string
Return values
string

getSharedFeedCoverTypeIdAttribute()

public getSharedFeedCoverTypeIdAttribute() : string
Return values
string

getSmallestRoleId()

public getSmallestRoleId() : int
Return values
int

getTotalCommentAttribute()

public getTotalCommentAttribute() : int
Return values
int

getTotalReplyAttribute()

public getTotalReplyAttribute() : int
Return values
int

getUserAttribute()

public getUserAttribute() : mixed

getUserDescription()

public getUserDescription() : string
Return values
string

getUserEntityAttribute()

public getUserEntityAttribute() : mixed

hasAdminRole()

public hasAdminRole() : bool
Return values
bool

hasContentPrivacy()

public hasContentPrivacy() : bool
Return values
bool

hasEmailAddress()

Check if the user has an associated email address.

public hasEmailAddress() : bool
Return values
bool

hasFeedDetailPage()

public hasFeedDetailPage() : bool
Return values
bool

hasNamedNotification()

public hasNamedNotification() : null|string
Tags
inheritDoc
Return values
null|string

hasPendingMode()

public hasPendingMode() : bool
Return values
bool

hasPermissionValue()

public hasPermissionValue(mixed $permission) : bool
Parameters
$permission : mixed
Return values
bool

hasPhoneNumber()

Check if the user has an associated phone number.

public hasPhoneNumber() : bool
Return values
bool

hasRemoveFeed()

public hasRemoveFeed(User $user[, Content $content = null ]) : bool
Parameters
$user : User
$content : Content = null
Tags
inheritDoc
Return values
bool

hasRole()

public hasRole(mixed $roles[, string $guard = null ]) : bool
Parameters
$roles : mixed
$guard : string = null
Return values
bool

hasStaffRole()

public hasStaffRole() : bool
Return values
bool

hasSuperAdminRole()

public hasSuperAdminRole() : bool
Return values
bool

hasValuePermissionViaRole()

public hasValuePermissionViaRole(Permission $permission) : bool
Parameters
$permission : Permission
Return values
bool

hasVerified()

Determine if the user has verified their account.

public hasVerified() : bool
Return values
bool

isApproved()

public isApproved() : bool
Return values
bool

isDeleted()

public isDeleted() : bool
Return values
bool

isGuest()

public isGuest() : bool
Return values
bool

isNotApproved()

public isNotApproved() : bool
Return values
bool

isPendingMode()

public isPendingMode() : bool|null
Return values
bool|null

isTaggingAllowed()

public isTaggingAllowed() : bool
Tags
inheritDoc
Return values
bool

markAsVerified()

Mark the user as verified.

public markAsVerified() : void

mustVerify()

Check whether the user needs to verify their registered email / phone number.

public mustVerify() : bool
Return values
bool

mustVerifyEmailAddress()

Check whether the user needs to verify their email address.

public mustVerifyEmailAddress() : bool
Return values
bool

mustVerifyPhoneNumber()

Check whether the user needs to verify their phone number.

public mustVerifyPhoneNumber() : bool
Return values
bool

notificationEmail()

public notificationEmail() : string
Return values
string

notificationFullName()

public notificationFullName() : string
Return values
string

notificationPhoneNumber()

public notificationPhoneNumber() : string
Return values
string

notificationUserName()

public notificationUserName() : string
Return values
string

notify()

Send the given notification.

public notify(mixed $instance) : void
Parameters
$instance : mixed

notifyNow()

Send the given notification immediately.

public notifyNow(mixed $instance) : void
Parameters
$instance : mixed

owner()

public owner() : mixed

ownerEntity()

public ownerEntity() : mixed

ownerId()

public ownerId() : int
Return values
int

ownerType()

public ownerType() : string
Return values
string

preferredLocale()

public preferredLocale() : string|null
Return values
string|null

profile()

public profile() : HasOne
Return values
HasOne

revokeAllTokens()

public revokeAllTokens() : void

routeNotificationFor()

Get the notification routing information for the given driver.

public routeNotificationFor(string $driver, Notification $notification) : mixed
Parameters
$driver : string
$notification : Notification

save()

Save the model to the database.

public save([array<string|int, mixed> $options = [] ]) : bool
Parameters
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return values
bool

sendPasswordResetNotification()

Send the password reset notification.

public sendPasswordResetNotification(string $token) : void
Parameters
$token : string

shouldVerifyEmailAddress()

Check whether the user should to verify their email address.

public shouldVerifyEmailAddress() : bool
Return values
bool

shouldVerifyPhoneNumber()

Check whether the user should to verify their phone number.

public shouldVerifyPhoneNumber() : bool
Return values
bool

syncHasManyRelationAttribute()

Save the hasMany nested relation attributes to the database.

public syncHasManyRelationAttribute(HasMany $relation, array<string|int, mixed> $params) : bool
Parameters
$relation : HasMany
$params : array<string|int, mixed>
Return values
bool

syncHasOneRelationAttribute()

public syncHasOneRelationAttribute(HasOne $relation, array<string|int, mixed> $params) : bool
Parameters
$relation : HasOne
$params : array<string|int, mixed>
Return values
bool

toActivitySubscription()

This method must return [$userId, $ownerId] $userId: who subscribe $ownerId: whom subscribe from When $owner post content on profile, $userId can see $owner feed.

public toActivitySubscription() : array<string|int, int>
Return values
array<string|int, int>

toApprovedNotification()

public toApprovedNotification() : array<string|int, mixed>
Return values
array<string|int, mixed>
public toDeclinedContentLink() : string|null
Return values
string|null

toDeclinedContentUrl()

public toDeclinedContentUrl() : string|null
Return values
string|null
public toLink() : string|null
Return values
string|null

toOGDescription()

public toOGDescription([User|null $context = null ]) : string|null
Parameters
$context : User|null = null
Return values
string|null

toPaymentSettingUrl()

public toPaymentSettingUrl() : string
Return values
string

toPrivacyItem()

Result [ [$userId, $itemId, $itemType, $privacyType] ] $userId: to Insert into privacy_data $itemId: $itemType, $privacyType: to find privacy_id.

public toPrivacyItem() : array<string|int, mixed>
Return values
array<string|int, mixed>

toPrivacyLists()

public toPrivacyLists() : array<string|int, mixed>
Return values
array<string|int, mixed>

toRouter()

public toRouter() : string|null
Return values
string|null

toSearchable()

public toSearchable() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

toSitemapUrl()

public toSitemapUrl() : string|null
Return values
string|null

toTitle()

public toTitle() : string
Return values
string

toUrl()

public toUrl() : string|null
Return values
string|null

toUserResource()

public toUserResource() : array<string, mixed>
Return values
array<string, mixed>

transformRole()

public transformRole() : string
Return values
string

user()

public user() : mixed

userActivity()

public userActivity() : HasOne
Return values
HasOne

userEntity()

public userEntity() : mixed

userId()

public userId() : int
Return values
int

userType()

public userType() : string
Return values
string

validateForPassportPasswordGrant()

public validateForPassportPasswordGrant(string $input) : bool
Parameters
$input : string
Return values
bool

validatePassword()

public validatePassword(mixed $input) : bool
Parameters
$input : mixed
Return values
bool

allowDestroyNestedAttributes()

Check can we delete nested data.

protected allowDestroyNestedAttributes(array<string|int, mixed> $params) : bool
Parameters
$params : array<string|int, mixed>
Return values
bool

newFactory()

protected static newFactory() : UserFactory
Return values
UserFactory

normalizeRoles()

private normalizeRoles(mixed $roles) : array<string|int, mixed>
Parameters
$roles : mixed
Return values
array<string|int, mixed>

        
On this page

Search results