Skip to content

Commit

Permalink
Remove int cast from authentication adapters.
Browse files Browse the repository at this point in the history
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
markstory committed Nov 7, 2012
1 parent 929ed57 commit 3de72ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
Expand Up @@ -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])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
Expand Up @@ -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;
Expand Down

0 comments on commit 3de72ba

Please sign in to comment.