bundle/EventListener/User/PostActivateEventListener.php
public function onPostActivate(PostActivateEvent $event): void
    {
        $user = $event->getUser();

        $this->ezUserAccountKeyRepository->removeByUserId($user->id);
        $this->ngUserSettingRepository->activateUser($user->id);

        $this->mailHelper
            ->sendMail(
                [$user->email => $this->getUserName($user)],
                'ngsite.user.welcome.subject',
                $this->configResolver->getParameter('template.user.mail.welcome', 'ngsite'),
                [
                    'user' => $user,
                ]
            );
    }
public function onPostActivate(PostActivateEvent $event): void
    {
        $user = $event->getUser();

        $this->ezUserAccountKeyRepository->removeByUserId($user->id);
        $this->ngUserSettingRepository->activateUser($user->id);

        $this->mailHelper
            ->sendMail(
                [$user->email => $this->getUserName($user)],
                'ngsite.user.welcome.subject',
                $this->configResolver->getParameter('template.user.mail.welcome', 'ngsite'),
                [
                    'user' => $user,
                ]
            );
    }
public function onPostActivate ( PostActivateEvent $ event ) : void { $ user = $ event -> getUser ( ) ; $ this -> ezUserAccountKeyRepository -> removeByUserId ( $ user -> id ) ; $ this -> ngUserSettingRepository -> activateUser ( $ user -> id ) ; $ this -> mailHelper -> sendMail ( [ $ user -> email => $ this -> getUserName ( $ user ) ] , 'ngsite.user.welcome.subject' , $ this -> configResolver -> getParameter ( 'template.user.mail.welcome' , 'ngsite' ) , [ 'user' => $ user , ] ) ; }
Listens to the event triggered after the user activation has been finished.
Event contains information about activated user.
Listens to the event triggered after the user activation has been finished . Event contains information about activated user .