Skip to content

Add "forgot password" option

The "forgot password" option allows users of a specific SiteAccess, admin or front, to request a password change. You can customize the template used in the /user/forgot-password route.

Follow the instructions to create and configure a "forgot password" form.

Add the following configuration files under the ibexa.system.<scope>.user_forgot_password configuration key:

1
2
3
4
5
6
7
ibexa:
    system:
        <scope>:
            user_forgot_password:
                templates:
                    form: <path_to_template>
                    mail: <path_to_template>

Under the templates key, provide the path to templates responsible for rendering the forgot password form (form) and email (mail), which users receive after they request a password change.

The default templates for forgot password form and email are located in ibexa/user/src/bundle/Resources/views. The templates specific for the back office are in ibexa/admin-ui/src/bundle/Resources/views/themes/admin/account.

You can also modify other user management templates.

To add a link redirecting to the reset password form, in the page layout template, provide the following code:

1
<a href="{{ path('ibexa.user.forgot_password') }}" tabindex="4">{{ 'authentication.forgot_password'|trans|desc('Forgot password?') }}</a>

You can customize the layout of templates according to your needs.

For more information, see Template documentation.