bundle/EventListener/User/PostPasswordResetEventListener.php
public function onPasswordReset(PostPasswordResetEvent $event): void
    {
        $user = $event->getUser();

        $this->mailHelper
            ->sendMail(
                [$user->email => $this->getUserName($user)],
                'ngsite.user.forgot_password.password_changed.subject',
                $this->configResolver->getParameter('template.user.mail.forgot_password_password_changed', 'ngsite'),
                [
                    'user' => $user,
                ]
            );

        $this->ezUserAccountKeyRepository->removeByUserId($user->id);
    }
public function onPasswordReset(PostPasswordResetEvent $event): void
    {
        $user = $event->getUser();

        $this->mailHelper
            ->sendMail(
                [$user->email => $this->getUserName($user)],
                'ngsite.user.forgot_password.password_changed.subject',
                $this->configResolver->getParameter('template.user.mail.forgot_password_password_changed', 'ngsite'),
                [
                    'user' => $user,
                ]
            );

        $this->ezUserAccountKeyRepository->removeByUserId($user->id);
    }
public function onPasswordReset ( PostPasswordResetEvent $ event ) : void { $ user = $ event -> getUser ( ) ; $ this -> mailHelper -> sendMail ( [ $ user -> email => $ this -> getUserName ( $ user ) ] , 'ngsite.user.forgot_password.password_changed.subject' , $ this -> configResolver -> getParameter ( 'template.user.mail.forgot_password_password_changed' , 'ngsite' ) , [ 'user' => $ user , ] ) ; $ this -> ezUserAccountKeyRepository -> removeByUserId ( $ user -> id ) ; }
Listens to the event triggered after the password has been reset.
Event contains the information about the user who has changed the password.
Listens to the event triggered after the password has been reset . Event contains the information about the user who has changed the password .