Skip to content

Instantly share code, notes, and snippets.

View lucasaba's full-sized avatar

Luca Saba lucasaba

View GitHub Profile
@hpatoio
hpatoio / HpatoioForcepassupdateListener.php
Last active June 26, 2018 15:58
Event listener to force FOS user to change password
<?php
namespace Hpatoio\UserBundle\EventListener;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\HttpFoundation\Session\Session;