Commit 20d569b8 by Julien Jorry

Fix issue with reset password

parent 749ccd19
...@@ -45,10 +45,12 @@ class UserListener implements EventSubscriberInterface ...@@ -45,10 +45,12 @@ class UserListener implements EventSubscriberInterface
public function onResetInitialize(GetResponseNullableUserEvent $event) public function onResetInitialize(GetResponseNullableUserEvent $event)
{ {
$user = $event->getUser(); $user = $event->getUser();
$user->setPasswordRequestedAt(null); if ($user != null) {
$user->setConfirmationToken(null); $user->setPasswordRequestedAt(null);
$this->em->persist($user); $user->setConfirmationToken(null);
$this->em->flush(); $this->em->persist($user);
$this->em->flush();
}
} }
public function onChangePasswordSuccess(FormEvent $event) public function onChangePasswordSuccess(FormEvent $event)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment