activateAccount

The activateAccount hook is triggered when a new front end account is activated. It passes the MemberModel of the activated account and the Module object of the calling front end module as arguments and does not expect a return value.

Parameters

  1. \Contao\MemberModel $member

    A model of the activated user account.

  2. \Contao\Module $module

    The registration module that was used to activate the account.

Example

// src/EventListener/ActivateAccountListener.php
namespace App\EventListener;

use Contao\CoreBundle\ServiceAnnotation\Hook;
use Contao\Module;
use Contao\MemberModel;

/**
 * @Hook("activateAccount")
 */
class ActivateAccountListener
{
    public function __invoke(MemberModel $member, Module $module): void
    {
        // Do something …
    }
}

References