Permalink
Browse files

Remove int cast from authentication adapters.

Forcing an int cast makes using the contain option difficult as you are
also required to manually set the recursive option. Omitting the
cast allows recursive to be set to null.

Fixes #3347
  • Loading branch information...
1 parent 929ed57 commit 3de72baeb1d911aecbea51006f815742696b3c9f @markstory markstory committed Nov 7, 2012
@@ -84,7 +84,7 @@ protected function _findUser($username, $password) {
}
$result = ClassRegistry::init($userModel)->find('first', array(
'conditions' => $conditions,
- 'recursive' => (int)$this->settings['recursive'],
+ 'recursive' => $this->settings['recursive'],
'contain' => $this->settings['contain'],
));
if (empty($result) || empty($result[$model])) {
@@ -170,7 +170,7 @@ protected function _findUser($username, $password) {
}
$result = ClassRegistry::init($userModel)->find('first', array(
'conditions' => $conditions,
- 'recursive' => (int)$this->settings['recursive']
+ 'recursive' => $this->settings['recursive']
));
if (empty($result) || empty($result[$model])) {
return false;

0 comments on commit 3de72ba

Please sign in to comment.