interface IUserStorage

deprecated use Nette\Security\UserStorage

Constants

MANUAL

Log-out reason IUserStorage::getLogoutReason()

INACTIVITY

Log-out reason IUserStorage::getLogoutReason()

CLEAR_IDENTITY

Log-out behavior

Methods

setAuthenticated(bool $state)

Sets the authenticated status of this user.

bool
isAuthenticated()

Is this user authenticated?

setIdentity(IIdentity|null $identity)

Sets the user identity.

IIdentity|null
getIdentity()

Returns current user identity, if any.

setExpiration(string|null $expire, int $flags = 0)

Enables log out from the persistent storage after inactivity (like '20 minutes'). Accepts flag IUserStorage::CLEAR_IDENTITY.

int|null
getLogoutReason()

Why was user logged out?

Details

at line 30
IUserStorage setAuthenticated(bool $state)

Sets the authenticated status of this user.

Parameters

bool $state

Return Value

IUserStorage

at line 35
bool isAuthenticated()

Is this user authenticated?

Return Value

bool

at line 41
IUserStorage setIdentity(IIdentity|null $identity)

Sets the user identity.

Parameters

IIdentity|null $identity

Return Value

IUserStorage

at line 46
IIdentity|null getIdentity()

Returns current user identity, if any.

Return Value

IIdentity|null

at line 52
IUserStorage setExpiration(string|null $expire, int $flags = 0)

Enables log out from the persistent storage after inactivity (like '20 minutes'). Accepts flag IUserStorage::CLEAR_IDENTITY.

Parameters

string|null $expire
int $flags

Return Value

IUserStorage

at line 57
int|null getLogoutReason()

Why was user logged out?

Return Value

int|null