customerKey.php
Table of Contents
Functions
- customerKey() : null|int|string
- Returns the customer organization key an authenticated account is a contact for.
Functions
customerKey()
Returns the customer organization key an authenticated account is a contact for.
customerKey(User $user) : null|int|string
Resolves the account's first CustomerEmployee business identity and
returns the _key of the organization it works for (subject.worksFor) — the
pivot used to scope a customer contact's resources (e.g. invoices or pricing
conditions of that customer). A contact works for a single customer, so a
single key is returned.
Parameters
- $user : User
-
The authenticated account, with its
identitieshydrated.
Tags
Return values
null|int|string —The customer organization _key, or null when the
account has no customer-contact identity.