Accounts
Account Pages
There are 5 primary pages that are used with Accounts.
Log In
The Log In page is where the user will log into their account. They will be shown this page if you link directly to the Log In page or if you link to a page that is password protected but the user is not logged in yet.
The URL for this page is: yourdomain.com/account/login.
Log Out
The Log Out page isn't an actual page that gets displayed to the user. Rather it is a special URL that when accessed will log out the currently logged in account and return them to the log in page.
The URL is: yourdomain.com/account/logout.
My Account
The My Account page is the primary landing page for the account once they've logged in. It can display information about the account and is usually used to link to other account pages, such as the Edit Account page.
The URL for this page is: yourdomain.com/account.
Edit Account
The Edit Account page is where the user can edit their account profile. It is only accessible if the account holder is logged in.
The URL for this page is: yourdomain.com/account/edit.
Register
The Register page allows a website visitor to create a new account profile.
The URL for this page is: yourdomain.com/account/register.
Not Allowed
This page is shown is the logged in account holder tries to access a page that they do not have access to.
The URL for this page is: yourdomain.com/account/notallowed.
Account Templates
Each page within the account app has its own template to display that page's content.
Where to save template files
Template files will go in a folder that has the same name as the app instance key. The account app is for public accounts and does not have multiple app instances. It's app key is "account" and the name of the template folder is also "account". You would put all of your template files within the account folder inside the templates folder.
If your theme was called "Custom" then this would be an example folder structure:
- themes
- custom
- theme.json
- templates
- home.twig
- one-column.twig
- two-column.twig
- account
- edit-account.twig
- home.twig
- login.twig
- not-allowed.twig
- password-reset.twig
- register.twig
- custom
Account pages and their templates
Below is the list of account app pages and the name of the template file that you should create.
App home
The app home page often shows the logged in account holder information and provides link to edit the account or log out.
Template name: home.twig
Edit account
This page shows the app form for edit the account. Set up the "Edit Account" form under Users -> Public Accounts -> Forms.
Template name: edit-account.twig
Login
This page shows the the login form. Set up the "Login" form under Users -> Public Accounts -> Forms.
Template name: login.twig
Not allowed
This page is used to display a message if the logged in user tries to access content that the have not been giving permission to access.
Template name: not-allowed.twig
Password reset
This page shows the password reset form. It's used to reset the password for an account that is not logged in. Set up the "Password Reset" form under Users -> Public Accounts -> Forms
Template name: password-reset.twig
Register
This page shows a form that allows someone to register for a new account. Set up the "Register" form under Users -> Public Accounts -> Forms
Template name: register.twig