这是我今天面临的关键问题。我的 Cakephp 项目无法与 chrome、safari 保持会话,它在 mozilla 中的工作原理public function login(){ $this->layout = 'login'; if ($this->request->is('post')) { if ($this->Auth->login()) { $this->authUser = AppModel::$authUser = $this->Auth->user(); } else { $this->Session->setFlash('Username or password was incorrect.', 'flash_failure'); } } if ($this->authUser) { $menus = Menu::get(Menu::$default, $this->Acl, $this->authUser['group_id']); $home_link = Menu::getDefaultLink($menus); //debug($_SESSION); debug($_COOKIE); debug($home_link); debug($this->authUser); exit; $this->redirect($home_link); }}登录后我检查$this->authUser。它在这里工作正常。但它重定向到$home_link。它带我回到登录。然后我检查会话我没有在会话中找到auth.user密钥
- 1 回答
- 0 关注
- 129 浏览
添加回答
举报
0/150
提交
取消