From 8313fef72dbed611da3cde189345cb46fed8ca55 Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 18 May 2008 04:49:54 +0000 Subject: [PATCH] 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 --- cake/libs/controller/components/auth.php | 2 +- cake/tests/cases/libs/controller/components/auth.test.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index cd56a0b12..14be81188 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -747,7 +747,7 @@ class AuthComponent extends Object { return false; } $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])) { return null; } diff --git a/cake/tests/cases/libs/controller/components/auth.test.php b/cake/tests/cases/libs/controller/components/auth.test.php index 226ddf6d2..d033d98e4 100644 --- a/cake/tests/cases/libs/controller/components/auth.test.php +++ b/cake/tests/cases/libs/controller/components/auth.test.php @@ -168,9 +168,8 @@ class AuthTest extends CakeTestCase { } $this->Controller =& new AuthTestController(); - restore_error_handler(); + $this->Controller->_initComponents(); - set_error_handler('simpleTestErrorHandler'); ClassRegistry::addObject('view', new View($this->Controller)); $this->Controller->Session->del('Auth'); $this->Controller->Session->del('Message.auth');