Oihana PHP System

sellerKeys.php

Table of Contents

Functions

sellerKeys()  : array<int, int|string>
Returns every seller key of an authenticated account.

Functions

sellerKeys()

Returns every seller key of an authenticated account.

sellerKeys(User $user) : array<int, int|string>

Resolves all Seller business identities of the account and returns their subject _key — the multi-valued pivot used to scope a salesperson's own resources (e.g. the customers whose seller is one of these keys). An account may wear several seller hats; this is the plural counterpart of sellerKey().

Parameters
$user : User

The authenticated account, with its identities hydrated.

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

$keys = sellerKeys( $currentUser ) ; // e.g. [ '147737218' , '147737209' ] or []
Return values
array<int, int|string>

The seller _key list (deduplicated, never null entries), or an empty array when the account has no seller identity.

On this page

Search results