浏览代码

Fixing key checking in AuthComponent

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4290 3807eeeb-6ff5-0310-8944-8be069107fe0
nate 19 年之前
父节点
当前提交
2e715c9da0
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      cake/libs/controller/components/auth.php

+ 2 - 2
cake/libs/controller/components/auth.php

@@ -180,7 +180,7 @@ class AuthComponent extends Object {
 			}
 			return;
 		} else {
-			if (!$this->Session->check($this->sessionKey)) {
+			if (!$this->Session->check($this->sessionKey . '.' . $this->_model->primaryKey)) {
 
 				if (!$this->RequestHandler->isAjax()) {
 					$this->Session->write('Auth.redirect', $controller->params['url']['url']);
@@ -234,7 +234,7 @@ class AuthComponent extends Object {
 		$this->_model =& $this->getUserModel();
 
 		if (empty($this->sessionKey) && !empty($this->_model)) {
-			$this->sessionKey = 'Auth.' . $this->userModel . '.' . $this->_model->primaryKey;
+			$this->sessionKey = 'Auth.' . $this->userModel;
 		}
 	}
 /**