Skip to content

Commit

Permalink
Merge pull request #546 from tPl0ch/2.1-authenticate-recursive
Browse files Browse the repository at this point in the history
Adding missing 'recursive' option to DigestAuthenticate object.
  • Loading branch information
markstory committed Mar 5, 2012
2 parents 664b053 + 79cab67 commit 74b6875
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
Expand Up @@ -82,7 +82,7 @@ protected function _findUser($username, $password) {
}
$result = ClassRegistry::init($userModel)->find('first', array(
'conditions' => $conditions,
'recursive' => $this->settings['recursive']
'recursive' => (int)$this->settings['recursive']
));
if (empty($result) || empty($result[$model])) {
return false;
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
Expand Up @@ -78,6 +78,7 @@ class DigestAuthenticate extends BaseAuthenticate {
),
'userModel' => 'User',
'scope' => array(),
'recursive' => 0,
'realm' => '',
'qop' => 'auth',
'nonce' => '',
Expand Down Expand Up @@ -166,7 +167,7 @@ protected function _findUser($username, $password) {
}
$result = ClassRegistry::init($userModel)->find('first', array(
'conditions' => $conditions,
'recursive' => 0
'recursive' => (int)$this->settings['recursive']
));
if (empty($result) || empty($result[$model])) {
return false;
Expand Down

0 comments on commit 74b6875

Please sign in to comment.