Skip to content
Last updated

WHMCS\User\Client\Contact

Class · extends AbstractModel · implements ContactInterface

A client contact

Client users may have more than one set of contact information on their account. WHMCS uses this contact information when sending messages from specific systems. For instance, a client contact can be configured as a domain contact, and WHMCS will send all domain related email to the contact instead of the client. The contact object models this extra client contact information.

Traits

  • EmailPreferences

Methods

client

public function client()

Each contact belongs to one client.

Returns \Illuminate\Database\Eloquent\Relations\BelongsTo

public function remoteAccountLinks()

A client can have many linked remote accounts.

Returns \Illuminate\Database\Eloquent\Relations\HasMany

orders

public function orders()

An addon can have many orders.

Returns HasMany

scopeLegacySubaccount

public function scopeLegacySubaccount($query)

Retrieve all legacy subaccount contacts.

Parameters

TypeNameDescription
Builder$query

Returns Builder

getFullNameAttribute

public function getFullNameAttribute()

"FullName" is the concatenation of first and last name.

In classic WHMCS objects, we compute a field named "name" which combines the first and last name for convenience in templates.

Returns string — The combined name

getCountryNameAttribute

public function getCountryNameAttribute()

Returns the human readable name for the contacts country.

Returns string

updateLastLogin

public function updateLastLogin(Carbon $time = null, $ip = null, $host = null)

getLanguageAttribute

public function getLanguageAttribute()

getTwoFactorAuthModuleAttribute

public function getTwoFactorAuthModuleAttribute()

getPhoneNumberFormattedAttribute

public function getPhoneNumberFormattedAttribute()

Returns formatted phone number.

If PhoneNumberDropdown setting enabled, then phone number will be formatted to be digestable by jackocnr/intl-tel-input script used.

Returns string

tickets

public function tickets()

A contact can have many tickets.

Returns HasMany