我的问题是捕获用户注销.我所拥有的代码是:
public function onAuthenticationFailure(Request $request, AuthenticationException $exception){
return new Response($this->translator->trans($exception->getMessage()));
}
public function logout(Request $request, Response $response, TokenInterface $token)
{
$empleado = $token->getUser();
$log = new Log();
$log->setFechalog(new \DateTime('now'));
$log->setTipo("Out");
$log->setEntidad("");
$log->setEmpleado($empleado);
$this->em->persist($log);
$this->em->flush();
}
public function onLogoutSuccess(Request $request) {
return new RedirectResponse($this->router->generate('login'));
}
Run Code Online (Sandbox Code Playgroud)
问题是,TokenInterface当您运行注销功能时,我无法访问用户令牌?
你好我使用themeswitcher jquery ui但现在没有工作.
mi代码是:
<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
$('#switcher').themeswitcher({
onSelect: function() {
$.cookie('hola',$.cookie('jquery-ui-theme'),{ expires: 7 });
//alert($.cookie('jquery-ui-theme'));
},
path:'/web/'
,initialText: "Seleccione tema"
,loadTheme: "Smoothness"
,buttonPreText: "Tema: "
});
Run Code Online (Sandbox Code Playgroud)
我认为方向不起作用.
小部件不存在?
有人可以帮帮我吗?谢谢.