Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 1.36 KB

6-confirmation.md

File metadata and controls

67 lines (50 loc) · 1.36 KB

Confirmation

Config

# config/packages/sulu_community.yaml

sulu_community:
    webspaces:
        <webspace_key>: # Replace <webspace_key> with the key of your webspace
            confirmation: 
                activate_user: true
                auto_login: true
                email:
                    subject: Confirmation
                    user_template: ~
                    admin_template: ~
                redirect_to: ~
                template: community/confirmation-message.html.twig

email

After the user successfully confirmed his email address you can send him a welcome message or inform the admin that a user has registered.

Example Template:

{# community/confirmation-email.html.twig #}

{% extends 'base-email.html.twig' %}

{% block content %}
    <h1>Welcome</h1>

    <a href="{{ url('sulu_community.login') }}">
        Login
    </a>
{% endblock %}

template

When the user clicks on the confirmation link the following template will be rendered:

Example Template:

{# community/confirmation-message.html.twig #}

{% extends 'base.html.twig' %}

{% block content %}
    <h1>Confirmation</h1>

    {% if success %}
        <p>
            You successfully activated your user.
        </p>
    {% else %}
        <p>
            Invalid confirmation token.
        </p>
    {% endif %}
{% endblock %}