Cakephp 2.0 如何防止在cakephp中注销后访问访问过的页面?

Cakephp 2.0 如何防止在cakephp中注销后访问访问过的页面?,cakephp-2.0,Cakephp 2.0,请回答我的问题。我没有得到满意的答复 问题是:“如何防止在cakephp中注销后访问访问的页面?” 在筛选前的AppController中提前感谢: // Check if the user is logged in if (isset($this->Auth->user())) { // Save the visited page in session $this->Session->write('VisitedPages.', $this->he

请回答我的问题。我没有得到满意的答复

问题是:“如何防止在cakephp中注销后访问访问的页面?”
在筛选前的AppController中提前感谢

// Check if the user is logged in
if (isset($this->Auth->user())) {
    // Save the visited page in session
    $this->Session->write('VisitedPages.', $this->here());
// If the user is not logged in
} else {
    // If the user has logged out and visited the page before
    if (isset($this->Session->read('VisitedPages.'.$this->here()))) {
        $this->redirect('/errorPage');
    }
}
是否相关?