2011-07-28 123 views

回答

1

如果有疑问,只需使用的精确路线尽可能并把它附近的列表的顶部

Router::connect('/users/logout', array('controller' => 'ef_users', 'action' => 'logout')); 
+0

它没有工作...这是url http://localhost/index.php?/ users/logout,但是当我点击它时,它不会去http://localhost/index.php?/ ef_users /注销 – chchrist

+0

对不起,它被缓存了。有用! – chchrist

1

你也可能会考虑使用logoutRedirect,它仍然会使用标准的CakePHP注销功能将用户注销,然后将用户重定向到您的ef_users注销操作。

$ this-> Auth-> logoutRedirect = array('controller'=>'ef_users','action'=>'logout');

更多信息请访问:http://book.cakephp.org/view/1271/logoutRedirect