Documentation

UserCollection
in package
implements UserCollectionInterface

Class UserCollection

Table of Contents

Interfaces

UserCollectionInterface

Properties

$className  : string

Methods

__construct()  : mixed
UserCollection constructor.
count()  : int
delete()  : bool
Remove user account.
find()  : UserInterface
Find a user by username, email, etc
load()  : UserInterface
Load user account.
filterUsername()  : string

Properties

Methods

__construct()

UserCollection constructor.

public __construct(string $className) : mixed
Parameters
$className : string

delete()

Remove user account.

public delete(string $username) : bool
Parameters
$username : string
Return values
bool

True if the action was performed

find()

Find a user by username, email, etc

public find(string $query[, array<string|int, mixed> $fields = ['username', 'email'] ]) : UserInterface
Parameters
$query : string

the query to search for

$fields : array<string|int, mixed> = ['username', 'email']

the fields to search

Return values
UserInterface

load()

Load user account.

public load(string $username) : UserInterface

Always creates user object. To check if user exists, use $this->exists().

Parameters
$username : string
Return values
UserInterface

filterUsername()

protected filterUsername(string $username) : string
Parameters
$username : string
Return values
string

        
On this page

Search results