mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Updating find calls to use new syntax
Signed-off-by: Mark Story <mark@mark-story.com>
This commit is contained in:
parent
ed2e20ed23
commit
10aa5d158b
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue