Appearance
Scope "user" events
Blade will send some small payloads to the bus whenever a frontend User will be able to "login" or "logout" into/from current browser's session.
onUserLogin
Fired whenever a "user" (or a "customer") will login (successfully or not).
Let's review an example:
js
{
success: true,
msg: 'Login effettuato con successo',
errors: [
'Recaptcha challenge has been timed-out'
],
redirect: null,
customer_id: 1
}
Variables full details
Here you can find a detailed description of each variable or sub-branch:
Var | Type | Description |
---|---|---|
success | bool | If the user has been successfully logged-in |
msg | string | Message viewed by the user |
errors | errors | Array of errors which have been encountered |
redirect | string/null | Redirect the user to this URL after a successfull login |
customer_id | int | Customer unique id |
onUserLogout
Fired whenever a "user" (or a "customer") will log out (successfully or not).
Let's review an example:
js
{
success: true,
msg: 'Disconnessione avvenuta con successo; attendere il redirect automatico',
redirect: null,
customer_id: 1
}
Variables full details
Here you can find a detailed description of each variable or sub-branch:
Var | Type | Description |
---|---|---|
success | bool | If the user has been successfully logged-out |
msg | string | Message viewed by the user |
redirect | string/null | Redirect the user to this URL after a successfull login |
customer_id | int | Customer unique id |