Login
extends Login
in package
uses
ExtensionsTrait
Class created by Core/Internal/PluginsDeploy
Table of Contents
Constants
- INCIDENT_EXPIRATION_TIME = 600
- IP_LIST = 'login-ip-list'
- MAX_INCIDENT_COUNT = 6
- USER_LIST = 'login-user-list'
Properties
- $empresa : Empresa
- $title : string
- $two_factor_user : string
- $extensionCache : array<string|int, mixed>
- Cache for extension lookups by method name.
- $extensions : array<string|int, mixed>
- Stores class extensions.
Methods
- __call() : mixed
- Executes the first matched extension.
- __construct() : mixed
- addExtension() : void
- clearExtensions() : void
- Clears all registered extensions.
- clearIncidents() : void
- getExtensions() : array<string|int, mixed>
- Returns a list of all registered extension names.
- getPageData() : array<string|int, mixed>
- hasExtension() : bool
- pipe() : mixed
- pipeFalse() : bool
- removeExtension() : bool
- Removes all extensions with the specified name.
- run() : void
- saveIncident() : void
- userHasManyIncidents() : bool
- changePasswordAction() : void
- getIpList() : array<string|int, mixed>
- getUserList() : array<string|int, mixed>
- loginAction() : void
- logoutAction() : void
- saveCookies() : void
- twoFactorValidationAction() : void
- updateUserAndRedirect() : void
- validateFormToken() : bool
- buildExtensionCache() : void
- Builds and caches sorted extensions for a method name.
Constants
INCIDENT_EXPIRATION_TIME
public
mixed
INCIDENT_EXPIRATION_TIME
= 600
IP_LIST
public
mixed
IP_LIST
= 'login-ip-list'
MAX_INCIDENT_COUNT
public
mixed
MAX_INCIDENT_COUNT
= 6
USER_LIST
public
mixed
USER_LIST
= 'login-user-list'
Properties
$empresa
public
Empresa
$empresa
$title
public
string
$title
= 'Login'
$two_factor_user
public
string
$two_factor_user
$extensionCache
Cache for extension lookups by method name.
protected
static array<string|int, mixed>
$extensionCache
= []
$extensions
Stores class extensions.
protected
static array<string|int, mixed>
$extensions
= []
Methods
__call()
Executes the first matched extension.
public
__call(string $name[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed> = []
Tags
__construct()
public
__construct(string $className[, string $url = '' ]) : mixed
Parameters
- $className : string
- $url : string = ''
addExtension()
public
static addExtension(mixed $extension[, int $priority = 100 ]) : void
Parameters
- $extension : mixed
- $priority : int = 100
-
Priority for all methods in this extension (0-1000, default 100)
clearExtensions()
Clears all registered extensions.
public
static clearExtensions() : void
clearIncidents()
public
clearIncidents() : void
getExtensions()
Returns a list of all registered extension names.
public
static getExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>getPageData()
public
getPageData() : array<string|int, mixed>
Return values
array<string|int, mixed>hasExtension()
public
hasExtension(mixed $name) : bool
Parameters
- $name : mixed
Return values
boolpipe()
public
pipe(string $name, array<string|int, mixed> ...$arguments) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed>
pipeFalse()
public
pipeFalse(string $name, array<string|int, mixed> ...$arguments) : bool
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
boolremoveExtension()
Removes all extensions with the specified name.
public
static removeExtension(string $name) : bool
Parameters
- $name : string
Return values
bool —True if at least one extension was removed
run()
public
run() : void
saveIncident()
public
saveIncident(string $ip[, string $user = '' ][, int|null $time = null ]) : void
Parameters
- $ip : string
- $user : string = ''
- $time : int|null = null
userHasManyIncidents()
public
userHasManyIncidents(string $ip[, string $username = '' ]) : bool
Parameters
- $ip : string
- $username : string = ''
Return values
boolchangePasswordAction()
protected
changePasswordAction(Request $request) : void
Parameters
- $request : Request
getIpList()
protected
getIpList() : array<string|int, mixed>
Return values
array<string|int, mixed>getUserList()
protected
getUserList() : array<string|int, mixed>
Return values
array<string|int, mixed>loginAction()
protected
loginAction(Request $request) : void
Parameters
- $request : Request
logoutAction()
protected
logoutAction(Request $request) : void
Parameters
- $request : Request
saveCookies()
protected
saveCookies(User $user, Request $request) : void
Parameters
twoFactorValidationAction()
protected
twoFactorValidationAction(Request $request) : void
Parameters
- $request : Request
updateUserAndRedirect()
protected
updateUserAndRedirect(User $user, string $ip, Request $request) : void
Parameters
validateFormToken()
protected
validateFormToken(Request $request) : bool
Parameters
- $request : Request
Return values
boolbuildExtensionCache()
Builds and caches sorted extensions for a method name.
private
buildExtensionCache(string $name) : void
Parameters
- $name : string