Skip to content
Permalink
Browse files

Updating find calls to use new syntax

Signed-off-by: Mark Story <mark@mark-story.com>
  • Loading branch information...
ADmad authored and markstory committed Oct 2, 2009
1 parent ed2e20e commit 10aa5d158ba3ec9111c6582dac9a03d41614d077
Showing with 7 additions and 2 deletions.
  1. +7 −2 cake/libs/controller/components/auth.php
@@ -862,12 +862,17 @@ function identify($user = null, $conditions = null) {
} 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;
}

0 comments on commit 10aa5d1

Please sign in to comment.
You can’t perform that action at this time.