Documentation

UserService
in package

Table of Contents

$searchableFields  : array<string|int, mixed>
fetchByAccountId()  : LengthAwarePaginator
Retrieves all WHMCS Users can handle the specified WHMCS Client (aka Account)
fetchOne()  : User
Retrieves the WHMCS User with the specified id or email
find()  : LengthAwarePaginator
Retrieves a filtered list of Users meeting the criteria
compileSelect()  : Builder
Prepare the select statement

Properties

$searchableFields

private array<string|int, mixed> $searchableFields = ['id' => 'tblusers.id', 'first_name' => 'tblusers.first_name', 'last_name' => 'tblusers.last_name', 'second_factor' => 'tblusers.second_factor', 'email' => 'tblusers.email']

searchable fields accepted in the request, translated to raw database field

Methods

fetchByAccountId()

Retrieves all WHMCS Users can handle the specified WHMCS Client (aka Account)

public fetchByAccountId(int $id) : LengthAwarePaginator
Parameters
$id : int

the WHMCS Client (aka Account) id

Return values
LengthAwarePaginator

paginated result

fetchOne()

Retrieves the WHMCS User with the specified id or email

public fetchOne(int|string $idOrEmail) : User
Parameters
$idOrEmail : int|string

WHMCS user id or email

Return values
User

the user object

find()

Retrieves a filtered list of Users meeting the criteria

public find([array<string|int, mixed> $criteria = [] ]) : LengthAwarePaginator
Parameters
$criteria : array<string|int, mixed> = []

associative array of field and value

Return values
LengthAwarePaginator

a paginated result of Users

compileSelect()

Prepare the select statement

private compileSelect() : Builder
Return values
Builder

query builder instance

Search results