Changing recursive setting in Auth user lookup query, allows $userScope to use joins, fixes #4665

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6919 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-05-18 04:49:54 +00:00
parent a33cfd0b98
commit 8313fef72d
2 changed files with 2 additions and 3 deletions

View file

@ -747,7 +747,7 @@ class AuthComponent extends Object {
return false; return false;
} }
$model =& $this->getModel(); $model =& $this->getModel();
$data = $model->find(array_merge($find, $conditions), null, null, -1); $data = $model->find(array_merge($find, $conditions), null, null, 0);
if (empty($data) || empty($data[$this->userModel])) { if (empty($data) || empty($data[$this->userModel])) {
return null; return null;
} }

View file

@ -168,9 +168,8 @@ class AuthTest extends CakeTestCase {
} }
$this->Controller =& new AuthTestController(); $this->Controller =& new AuthTestController();
restore_error_handler();
$this->Controller->_initComponents(); $this->Controller->_initComponents();
set_error_handler('simpleTestErrorHandler');
ClassRegistry::addObject('view', new View($this->Controller)); ClassRegistry::addObject('view', new View($this->Controller));
$this->Controller->Session->del('Auth'); $this->Controller->Session->del('Auth');
$this->Controller->Session->del('Message.auth'); $this->Controller->Session->del('Message.auth');