Created
June 9, 2011 09:06
-
-
Save xanf/1016389 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\ProdrepBundle\Security; | |
use Symfony\Component\HttpKernel\Event\FilterControllerEvent; | |
use FOS\UserBundle\Model\UserInterface; | |
class RequestListener | |
{ | |
public function onCoreController(FilterControllerEvent $event) | |
{ | |
$token = $this->_securityContext->getToken(); | |
if ( | |
null !== $token | |
&& $token->getUser() instanceof UserInterface | |
) { | |
//fixme: | |
setcookie( | |
ini_get("session.name"), | |
session_id(), | |
time()+ini_get("session.cookie_lifetime"), | |
ini_get("session.cookie_path"), | |
ini_get("session.cookie_domain"), | |
ini_get("session.cookie_secure"), | |
ini_get("session.cookie_httponly") | |
); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment