anonymous1983 / symfony2

Tuto symfony2
MIT License
0 stars 0 forks source link

Symfony2 IS AUTHENTICATED #7

Open anonymous1983 opened 8 years ago

anonymous1983 commented 8 years ago
if ($securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
     return $this->get('security.token_storage')->getToken()->getUser()->getId();
}else{
    return null;
}