use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
-use Rapsys\UserBundle\RapsysUserBundle;
-
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
+use Symfony\Component\HttpKernel\Exception\GoneHttpException;
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\Mime\Address;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
if ($pass != $this->slugger->hash($user->getPassword())) {
//Throw not found
//XXX: prevent use of outdated recover link
- throw $this->createNotFoundException($this->translator->trans('Outdated recover link', [], $this->alias));
+ throw new GoneHttpException($this->translator->trans('Outdated recover link', [], $this->alias));
}
//Set context
if (!empty($_POST['register']['mail'])) {
//Log new user infos
$this->logger->emergency(
+ //Translated register informations
$this->translator->trans(
'register: mail=%mail% locale=%locale% confirm=%confirm% ip=%ip%',
[
'%ip%' => $request->getClientIp()
],
$this->alias
- )
+ ),
+ //Set context
+ [
+ 'file' => __FILE__,
+ 'line' => __LINE__
+ ]
);
}