Zend框架2 - ZFCUser行动白名单不会重新路由工作 [英] Zend Framework 2 - ZFCUser action whitelisting does not work for rerouting

查看:218
本文介绍了Zend框架2 - ZFCUser行动白名单不会重新路由工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用从ZFCUser登录白名单几个动作此功能

除非我重定向到白名单中,这些网页之一一切的伟大工程。比如我有 myFormAction 其中重路由在无效格式的情况下本身或一个 successAction

Everything works great unless I redirect to one of these whitelisted pages. For example I have the myFormAction which reroutes in case of an invalid form to itself or to a successAction.

现在的问题是,点击任一情况下,我最终看到的ZFCUser登录按钮后。当我去通过URL或链接有第一次将这些网页之一,它的工作原理。

The problem is now that after clicking the button in any of these cases I end up seeing the ZFCUser login. When I go to one of these pages via URL or link there the first time, it works.

下面是 myFormAction 我的code为两种情况:

Here is my code for the two cases in myFormAction:

失败:

return array('myVar' => $myVar);

成功:

return $this->redirect()->toRoute('myModule', array('action' => 'Success'));

任何想法我可能是做错了?也许是重新路由没有通过 onBootstrap 功能ZFCUser块别处?

Any ideas what I might be doing wrong? Is maybe the rerouting not passing the onBootstrap function and ZFCUser blocks it somewhere else?

谢谢!

推荐答案

好吧,这是一个愚蠢的!

Ok, that was a stupid one!

有在我的链接的URL这是不是因为 ZFCUser 的重定向的显示错误!

There was an error in my link url which wasn't shown because of the ZFCUser's redirecting!

在记录显示,实际路径,并透露了错误...

Logging in showed the real path and revealed the error...

这篇关于Zend框架2 - ZFCUser行动白名单不会重新路由工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆