{"templateId":"markdown","versions":[{"version":"9.0","label":"9.0","link":"/classes/whmcs/user/client/contact","default":true,"active":true,"folderId":"9d7dc099"},{"version":"8.13","label":"8.13","link":"/classes/8.13/whmcs/user/client/contact","default":false,"active":false,"folderId":"9d7dc099"}],"sharedDataIds":{"sidebar":"sidebar-classes/@8.13/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"WHMCS\\User\\Client\\Contact","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"whmcsuserclientcontact","__idx":0},"children":["WHMCS\\User\\Client\\Contact"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Class"]}," · extends ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AbstractModel"]}," · implements ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ContactInterface"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A client contact"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"traits","__idx":1},"children":["Traits"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EmailPreferences"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods","__idx":2},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"client","__idx":3},"children":["client"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function client()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each contact belongs to one client."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\\Illuminate\\Database\\Eloquent\\Relations\\BelongsTo"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"remoteaccountlinks","__idx":4},"children":["remoteAccountLinks"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function remoteAccountLinks()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A client can have many linked remote accounts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\\Illuminate\\Database\\Eloquent\\Relations\\HasMany"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"orders","__idx":5},"children":["orders"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function orders()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An addon can have many orders."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HasMany"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"scopelegacysubaccount","__idx":6},"children":["scopeLegacySubaccount"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function scopeLegacySubaccount($query)\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Retrieve all legacy subaccount contacts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Builder"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$query"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Builder"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getfullnameattribute","__idx":7},"children":["getFullNameAttribute"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getFullNameAttribute()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["\"FullName\" is the concatenation of first and last name."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In classic WHMCS objects, we compute a field named \"name\" which combines"," ","the first and last name for convenience in templates."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — The combined name"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getcountrynameattribute","__idx":8},"children":["getCountryNameAttribute"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getCountryNameAttribute()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns the human readable name for the contacts country."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"updatelastlogin","__idx":9},"children":["updateLastLogin"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function updateLastLogin(Carbon $time = null, $ip = null, $host = null)\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getlanguageattribute","__idx":10},"children":["getLanguageAttribute"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getLanguageAttribute()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"gettwofactorauthmoduleattribute","__idx":11},"children":["getTwoFactorAuthModuleAttribute"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getTwoFactorAuthModuleAttribute()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"getphonenumberformattedattribute","__idx":12},"children":["getPhoneNumberFormattedAttribute"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function getPhoneNumberFormattedAttribute()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns formatted phone number."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If PhoneNumberDropdown setting enabled, then phone number will be formatted to be digestable"," ","by jackocnr/intl-tel-input script used."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"tickets","__idx":13},"children":["tickets"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function tickets()\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A contact can have many tickets."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HasMany"]}]}]},"headings":[{"value":"WHMCS\\User\\Client\\Contact","id":"whmcsuserclientcontact","depth":1},{"value":"Traits","id":"traits","depth":2},{"value":"Methods","id":"methods","depth":2},{"value":"client","id":"client","depth":3},{"value":"remoteAccountLinks","id":"remoteaccountlinks","depth":3},{"value":"orders","id":"orders","depth":3},{"value":"scopeLegacySubaccount","id":"scopelegacysubaccount","depth":3},{"value":"getFullNameAttribute","id":"getfullnameattribute","depth":3},{"value":"getCountryNameAttribute","id":"getcountrynameattribute","depth":3},{"value":"updateLastLogin","id":"updatelastlogin","depth":3},{"value":"getLanguageAttribute","id":"getlanguageattribute","depth":3},{"value":"getTwoFactorAuthModuleAttribute","id":"gettwofactorauthmoduleattribute","depth":3},{"value":"getPhoneNumberFormattedAttribute","id":"getphonenumberformattedattribute","depth":3},{"value":"tickets","id":"tickets","depth":3}],"frontmatter":{"title":"WHMCS\\User\\Client\\Contact","seo":{"title":"WHMCS\\User\\Client\\Contact"}},"lastModified":"2026-08-05T14:37:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/classes/whmcs/user/client/contact","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}