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.
\Contao\MemberModel $member
A model of the activated user account.
\Contao\Module $module
The registration module that was used to activate the account.
// src/EventListener/ActivateAccountListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\Module;
use Contao\MemberModel;
#[AsHook('activateAccount')]
class ActivateAccountListener
{
public function __invoke(MemberModel $member, Module $module): void
{
// Do something …
}
}