Documentation

UserCollection extends FlexCollection
in package
implements UserCollectionInterface

Class UserCollection

Tags
extends

Table of Contents

Interfaces

UserCollectionInterface

Methods

delete()  : bool
Delete user account.
find()  : UserObject
Find a user by username, email, etc
getCachedMethods()  : array<string|int, mixed>
load()  : UserObject
Load user account.
triggerEvent()  : $this
filterUsername()  : string
getActiveUser()  : UserInterface|null
getAuthorizeScope()  : string
getContainer()  : Grav
getFlexContainer()  : Flex
isAdminSite()  : bool

Methods

delete()

Delete user account.

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

True if user account was found and was deleted.

find()

Find a user by username, email, etc

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

the query to search for

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

the fields to search

Return values
UserObject

getCachedMethods()

public static getCachedMethods() : array<string|int, mixed>
Return values
array<string|int, mixed>

load()

Load user account.

public load(string $username) : UserObject

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

Parameters
$username : string
Return values
UserObject

triggerEvent()

public triggerEvent(string $name[, object|null $event = null ]) : $this
Parameters
$name : string
$event : object|null = null
Return values
$this

filterUsername()

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

getAuthorizeScope()

protected getAuthorizeScope() : string
Return values
string

isAdminSite()

protected isAdminSite() : bool
Return values
bool

        
On this page

Search results