Oihana PHP System

sellerKey.php

Table of Contents

Functions

sellerKey()  : null|int|string
Returns the seller key of an authenticated account.

Functions

sellerKey()

Returns the seller key of an authenticated account.

sellerKey(User $user) : null|int|string

Resolves the account's first Seller business identity and returns its subject _key — the pivot used to scope a salesperson's own resources (e.g. the customers whose assignedSeller._key matches it).

Parameters
$user : User

The authenticated account, with its identities hydrated.

Tags
example
use function xyz\oihana\schema\helpers\pivots\sellerKey;

$key = sellerKey( $currentUser ) ; // e.g. '147737218' or null
Return values
null|int|string

The seller _key, or null when the account has no seller identity.

On this page

Search results