class LoginAttempt implements EntryInterface (View source)

Log entry for user login attempts

Properties

protected string $username

The attempted login username

protected string $requestPath

The path that the login was submitted to

protected string[] $groups

The group names that this user would have access to

protected string[] $errors

The errors encountered when attempting login

Methods

__construct(string $username, string $requestPath, string[] $groups = [], string[] $errors = [])

LoginAttempt constructor.

string
getMessage()

Convert this entry into something that can be inserted into the log

array
getContext()

Get the added context for the log entry

Details

__construct(string $username, string $requestPath, string[] $groups = [], string[] $errors = [])

LoginAttempt constructor.

Parameters

string $username

The username used when attempting to log in

string $requestPath

The path that is being requested

string[] $groups

The groups the user would have access to

string[] $errors

string getMessage()

Convert this entry into something that can be inserted into the log

Return Value

string

array getContext()

Get the added context for the log entry

Ex: ["username": "...", "email": "...", "id": "...", "created_by": "..."]

Return Value

array