Who this is for. The theme developer whose first member task is restyling the account screens. Afterwards you know which templates to write, what each receives, and how the forms post.
The routes
Paths are the defaults. Templates are paths under templates/; a file at the same path in your site replaces the framework's.
| Route name | Path and methods | Who | Template | Receives | Framework copy |
|---|---|---|---|---|---|
login | /login, GET, POST | Anyone | users/login.html | user, localPasswordEnabled, passkeyEnabled, enabledOAuthAuthenticators | Yes, Smarty |
logout | /logout, GET | Signed in | None: it redirects | ||
register | /register, GET, POST | Signed out only | users/register.html | user, passkeyEnabled, and _recaptcha when the captcha is on | No |
forgotPassword | /forgot-password, GET, POST | Signed out | users/forgot-password.html | No | |
tokenLogin | /token-login?t=…, GET | Anyone with a token | None: it signs in and redirects | ||
resetPassword | /reset-password, GET, PUT | Signed in | users/reset-password.html | user, passkeyEnabled, localPasswordEnabled | No |
changePassword | /change-password, GET, PUT | Signed in | users/change-password.html | No | |
updateProfile | /profile, GET, PUT | Signed in | users/profile.html | user | No |
confirmEmail | /confirm-email?token=…, GET | Anyone with a token | users/users/confirm-email.html | user | No |
After any sign-in, the platform's own /oauth/authenticate route finishes the session and, when remember-me is on, shows the prompt at /oauth/remember-me, whose template the framework ships for both engines (Remember me). The member area's screens under /my-account are listed in The built-in member screens.
Two settings switch whole flows off. Registration answers 404 until the registration setting Enable is on (Registration settings). The Users setting Change Password, under Frontend, on by default, switches off the forgotten, reset and change password routes together.
When a template is missing
The framework ships one of these templates, the sign-in page, and only in Smarty. For any other route your site has not written a template for, the result depends on the engine:
- On a Smarty site the route answers HTTP 200 with a page that reads only
Template not found: users/register.html: no header, no footer, no error in the log to find. - On a Twig site the route fails with an error, and the framework's Smarty sign-in page cannot be used either: write
users/login.htmlin Twig too.
Write a template for every route the site links to, and request each one signed out and signed in before launch.
Linking to the routes
Link by route name, so the links follow if a path is changed for the site: $_url->getPath('changePassword') in Smarty, _url.getPath('changePassword') in Twig. The names are those in the table.
How the account forms post
- Methods. A route that takes PUT is posted as a POST with a hidden
_methodfield. - The CSRF token. Forms sent by a signed-in member (reset and change password, the profile) carry the token in a hidden
_csrffield, or are refused with a 403. Forms sent signed out (sign-in, registration, forgotten password) are not checked, and_csrfTokendoes not exist when they render, so do not print it unguarded (CSRF on member forms). - Errors. A failed form renders the same template again, with the visitor's input in
userwhere the route has it. Field errors arrive as_validation, withhasFieldError(name)andgetFieldErrorMessage(name), usually with HTTP 422; sign-in failures are a message with HTTP 400. Print the site's messages on every account page, since several routes report through them after a redirect.