Skip to content
This repository
Browse code

Updating find calls to use new syntax

Signed-off-by: Mark Story <mark@mark-story.com>
  • Loading branch information...
commit 10aa5d158ba3ec9111c6582dac9a03d41614d077 1 parent ed2e20e
ADmad authored October 03, 2009 markstory committed October 02, 2009

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. 9  cake/libs/controller/components/auth.php
9  cake/libs/controller/components/auth.php
@@ -862,12 +862,17 @@ function identify($user = null, $conditions = null) {
862 862
 			} else {
863 863
 				return false;
864 864
 			}
865  
-			$data = $model->find(array_merge($find, $conditions), null, null, 0);
  865
+			$data = $model->find('first', array(
  866
+				'conditions' => array_merge($find, $conditions),
  867
+				'recursive' => 0
  868
+			));
866 869
 			if (empty($data) || empty($data[$model->alias])) {
867 870
 				return null;
868 871
 			}
869 872
 		} elseif (!empty($user) && is_string($user)) {
870  
-			$data = $model->find(array_merge(array($model->escapeField() => $user), $conditions));
  873
+			$data = $model->find('first', array(
  874
+				'conditions' => array_merge(array($model->escapeField() => $user), $conditions),
  875
+			));
871 876
 			if (empty($data) || empty($data[$model->alias])) {
872 877
 				return null;
873 878
 			}

0 notes on commit 10aa5d1

Please sign in to comment.
Something went wrong with that request. Please try again.