Documentation

UserTrait

Trait UserTrait

Table of Contents

Methods

authenticate()  : bool
Authenticate user.
authorize()  : bool|null
Checks user authorization to the action.
get()  : mixed
getAvatarImage()  : ImageMedium|StaticImageMedium|null
Return media object for the User's avatar.
getAvatarUrl()  : string
Return the User's avatar URL
save()  : mixed
set()  : mixed
undef()  : mixed
generateMultiavatar()  : string

Methods

authenticate()

Authenticate user.

public authenticate(string $password) : bool

If user password needs to be updated, new information will be saved.

Parameters
$password : string

Plaintext password.

Return values
bool

authorize()

Checks user authorization to the action.

public authorize(string $action[, string|null $scope = null ]) : bool|null
Parameters
$action : string
$scope : string|null = null
Return values
bool|null

get()

public abstract get(mixed $name[, mixed $default = null ][, mixed $separator = null ]) : mixed
Parameters
$name : mixed
$default : mixed = null
$separator : mixed = null

getAvatarUrl()

Return the User's avatar URL

public getAvatarUrl() : string
Return values
string

set()

public abstract set(mixed $name, mixed $value[, mixed $separator = null ]) : mixed
Parameters
$name : mixed
$value : mixed
$separator : mixed = null

undef()

public abstract undef(mixed $name[, mixed $separator = null ]) : mixed
Parameters
$name : mixed
$separator : mixed = null

generateMultiavatar()

protected generateMultiavatar(string $hash) : string
Parameters
$hash : string
Return values
string

        
On this page

Search results