Skip the setup. Our team will have you taking orders in 24 hours. Get started →
Version notice: This documentation is for version 3, but the latest available version is version 4.
Extensions

User Extension

Introduction Installation Admin Panel Components Session Component Account Component Reset Password Component Events #Introduction Management of front-e...

Management of front-end users (customers) on TastyIgniter.

To install this extension, click on the Add to Site button on the TastyIgniter marketplace item page or search for Igniter.User in Admin System > Updates > Browse Extensions

In the admin user interface you can manage customers and their groups.

Name Page variable Description
Session @component('session') Manages the logged or guest user's session
Account @component('account') Provides the sign in form, registration form and update form
ResetPassword @component('resetPassword') Allows a user to reset their password if they have forgotten it.
AddressBook @component('addressBook') Manages the users delivery addresses

Properties

Property Description Example Value Default Value
security Restrict a page or layout to only signed in users, only guests or no restriction all/guest/customer all
redirectPage Page name to redirect to when access is restricted home home

Variables available in templates

Variable Description
{{ $customer }} Instance of the logged user model

Example:

@if ($customer)
    <p>Hello {{ $customer->first_name }}</p>
@else
    <p>Not logged in</p>
@endif

@auth
    // The customer is logged in...
@endauth

@guest
    // The customer is not logged in...
@endguest

Logout Example:

<a data-request="session::onLogout" data-request-data="redirect: '/home'">Logout</a>

Properties

Property Description Example Value Default Value
accountPage Account page name account/account account/account
addressPage Address book page name account/address account/address
ordersPage Orders page name account/orders account/orders
reservationsPage Reservations page name account/reservations account/reservations
reviewsPage Reviews page name account/reviews account/reviews
inboxPage Inbox page name account/inbox account/inbox
loginPage Login page name account/login account/login
agreeRegistrationTermsPage Terms page name
redirectPage Page name to redirect to when login or registration is successful account/account account/account

Variables available in templates

Variable Description
{{ $customer }} Instance of the logged user model

Example:


---

title: 'Account Details'
permalink: /account

'[account]': { }

---

...
@component('account')
...

Login Form Example


---

title: 'Account Login'
permalink: /login

'[account]': { }

---

...
@partial('account::login')
...

Register Form Example


---

title: 'Account Register'
permalink: /register

'[account]':
    agreeRegistrationTermsPage: 12

---

...
@partial('account::register')
...

Properties

Property Description Example Value Default Value
resetPage Page name to redirect to after reset link has been sent account/reset account/reset
loginPage Account login page name account/login account/login
paramName Route parameter name to find the reset code code code

Example:


---

title: 'Reset Password'
permalink: /forgot-password/:code?

'[resetPassword]': { }

---

...
@component('resetPassword')
...

This extension will fire some global events that can be useful for interacting with other extensions.

Event Description Parameters
igniter.user.beforeAuthenticate Before the user is attempting to authenticate [ $component, $credentials ]
igniter.user.beforeRegister Before the user is attempting to register [ &$postData ]
igniter.user.login The user has logged in successfully [ $component ]
igniter.user.logout The user has logged out sucessfully [ $customer ]
igniter.user.register The user has registered successfully [ $customer, $postData ]

Example of hooking an event

Event::listen('igniter.user.logout', function($customer) {
    // ...
});

Did this answer your question?

Your feedback helps us improve our help articles.

Need more help?

Explore the help center, join the community, or get priority support from the TastyIgniter team.