\App\Models\Database\EntitiesUser

User entity

Summary

Methods
Properties
Constants
getId()
__clone()
__construct()
getUserName()
getPassword()
getRole()
getLanguage()
setUserName()
setPassword()
setRole()
setLanguage()
verifyPassword()
toArray()
toIdentity()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$id
$username
$password
$role
$language
N/A

Properties

$id

$id : int|null

Type

normal — ID

$username

$username : string

Type

normal — User name

$password

$password : string

Type

normal — Password hash

$role

$role : string

Type

normal — User role

$language

$language : string

Type

normal — User language

Methods

getId()

getId() : int|null

Returns ID

Returns

int|null —

ID

__clone()

__clone() : mixed

Creates a deep copy

Returns

mixed

__construct()

__construct(string  $username, string  $password, string|null  $role = null, string|null  $language = null) : mixed

Constructor

Parameters

string $username

User name

string $password

User password

string|null $role

User role

string|null $language

User language

Returns

mixed

getUserName()

getUserName() : string

Returns the user name

Returns

string —

User name

getPassword()

getPassword() : string

Returns the password hash

Returns

string —

Password hash

getRole()

getRole() : string

Returns the user's role

Returns

string —

User's role

getLanguage()

getLanguage() : string

Returns the user's language

Returns

string —

User's language

setUserName()

setUserName(string  $userName) : void

Sets the user name

Parameters

string $userName

User name

setPassword()

setPassword(string  $password) : void

Sets the user's password

Parameters

string $password

User's password

setRole()

setRole(string  $role) : void

Sets the user role

Parameters

string $role

User role

setLanguage()

setLanguage(string  $language) : void

Sets the user language

Parameters

string $language

User language

verifyPassword()

verifyPassword(string  $password) : bool

Verifies the password

Parameters

string $password

Password to verify

Returns

bool —

Is the password correct?

toArray()

toArray() : array<string,int|string>

Converts this entity to an array

Returns

array

User entity as an array

toIdentity()

toIdentity() : \Nette\Security\IIdentity

Returns user's identity

Returns

\Nette\Security\IIdentity —

User's identity