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');