interface UserLookupInterface (View source)

Read access to individual user accounts by id, name or email.

Methods

array|null
getUserById(int $userId)

Get a user by ID

array|null
getUserByUsername(string $username)

Get a user by username

User|null
findByUsername(string $username)

Find a user by username

array|null
getUserByEmail(string $email)

Get a user by email

array
findActiveUsersByEmail(string $email)

Every active account registered to an email address, ordered by username.

int
countUsersByEmail(string $email)

Count how many users share the given email address.

int|null
findActiveUserIdByEmail(string $email)

Id of the active user with exactly this email address, accent-exact so a look-alike address from an identity provider cannot resolve to another account.

int|null
findInactiveUserIdByEmail(string $email)

Id of a disabled user with exactly this email address, matched the same way as findActiveUserIdByEmail().

array
getProvisioningProfile(int $userId)

The columns external provisioning compares before writing.

string|null
getFullNameById(int $userId)

Get a user's full name by ID

string|null
getFullNameByUsername(string $username)

Full name of the user with exactly this username (accent-exact match), or null when there is none

int|null
findZoneLimit(int $userId)

The user's own zone limit: null when none is set (the configured default applies), 0 when the user may own no zones

array
findZoneLimits(array $userIds)

findZoneLimit() for many users in one query

Details

array|null getUserById(int $userId)

Get a user by ID

Parameters

int $userId

User ID to retrieve

Return Value

array|null

User data if found, null otherwise

array|null getUserByUsername(string $username)

Get a user by username

Parameters

string $username

Username to search for

Return Value

array|null

User data if found, null otherwise

User|null findByUsername(string $username)

Find a user by username

Parameters

string $username

Username to search for

Return Value

User|null

User object if found, null otherwise

array|null getUserByEmail(string $email)

Get a user by email

Parameters

string $email

Email to search for

Return Value

array|null

User data if found, null otherwise

array findActiveUsersByEmail(string $email)

Every active account registered to an email address, ordered by username.

Parameters

string $email

Return Value

array

int countUsersByEmail(string $email)

Count how many users share the given email address.

Parameters

string $email

Email to search for

Return Value

int

Number of matching users

int|null findActiveUserIdByEmail(string $email)

Id of the active user with exactly this email address, accent-exact so a look-alike address from an identity provider cannot resolve to another account.

Parameters

string $email

Return Value

int|null

int|null findInactiveUserIdByEmail(string $email)

Id of a disabled user with exactly this email address, matched the same way as findActiveUserIdByEmail().

Parameters

string $email

Return Value

int|null

array getProvisioningProfile(int $userId)

The columns external provisioning compares before writing.

Parameters

int $userId

Return Value

array

Empty when the user does not exist

string|null getFullNameById(int $userId)

Get a user's full name by ID

Parameters

int $userId

User ID to look up

Return Value

string|null

Full name, or null if the user does not exist

string|null getFullNameByUsername(string $username)

Full name of the user with exactly this username (accent-exact match), or null when there is none

Parameters

string $username

Return Value

string|null

int|null findZoneLimit(int $userId)

The user's own zone limit: null when none is set (the configured default applies), 0 when the user may own no zones

Parameters

int $userId

Return Value

int|null

array findZoneLimits(array $userIds)

findZoneLimit() for many users in one query

Parameters

array $userIds

Return Value

array

Own limit keyed by user id; every requested id is present