use Rapsys\UserBundle\Entity\User;
use Rapsys\UserBundle\Exception\UnactivatedException;
-use Symfony\Component\Security\Core\User\InMemoryUserChecker;
+use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\DisabledException;
+use Symfony\Component\Security\Core\User\InMemoryUserChecker;
use Symfony\Component\Security\Core\User\UserInterface;
/**
/**
* {@inheritdoc}
*/
- public function checkPostAuth(UserInterface $user): void {
+ public function checkPostAuth(UserInterface $user, ?TokenInterface $token = null): void {
//Without User instance
if (!$user instanceof User) {
return;
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
/**
* {@inheritDoc}
*/
- public function load(ObjectManager $manager) {
+ public function load(ObjectManager $manager): void {
//Civility tree
$civilityTree = [
'Mister',
namespace Rapsys\UserBundle;
-use Rapsys\UserBundle\DependencyInjection\RapsysUserExtension;
-
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
*/
public static function getVersion(): string {
//Return version
- return '0.5.4';
+ return '0.5.8';
}
}