diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index 3b6de0879..09dbff6e9 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -736,9 +736,10 @@ class AuthComponent extends Object { ); } $model =& $this->getModel(); - - $data = $model->find(am($find, $this->userScope), null, null, -1); - + $model->set($find); + if($model->validates()) { + $data = $model->find(am($find, $this->userScope), null, null, -1); + } if (empty($data) || empty($data[$this->userModel])) { return null; }