Updating find calls to use new syntax

Signed-off-by: Mark Story <mark@mark-story.com>
This commit is contained in:
ADmad 2009-10-03 01:06:07 +05:30 committed by mark_story
parent ed2e20ed23
commit 10aa5d158b

View file

@ -862,12 +862,17 @@ class AuthComponent extends Object {
} else {
return false;
}
$data = $model->find(array_merge($find, $conditions), null, null, 0);
$data = $model->find('first', array(
'conditions' => array_merge($find, $conditions),
'recursive' => 0
));
if (empty($data) || empty($data[$model->alias])) {
return null;
}
} elseif (!empty($user) && is_string($user)) {
$data = $model->find(array_merge(array($model->escapeField() => $user), $conditions));
$data = $model->find('first', array(
'conditions' => array_merge(array($model->escapeField() => $user), $conditions),
));
if (empty($data) || empty($data[$model->alias])) {
return null;
}