Adding missing 'recursive' option to DigestAuthenticate object.

Used integer casting in _findUser() method for 'recursive' option.
This commit is contained in:
Thomas Ploch 2012-03-05 11:06:42 +01:00
parent 664b0538b8
commit 79cab67be7
2 changed files with 3 additions and 2 deletions

View file

@ -82,7 +82,7 @@ abstract class BaseAuthenticate {
}
$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;

View file

@ -78,6 +78,7 @@ class DigestAuthenticate extends BaseAuthenticate {
),
'userModel' => 'User',
'scope' => array(),
'recursive' => 0,
'realm' => '',
'qop' => 'auth',
'nonce' => '',
@ -166,7 +167,7 @@ class DigestAuthenticate extends BaseAuthenticate {
}
$result = ClassRegistry::init($userModel)->find('first', array(
'conditions' => $conditions,
'recursive' => 0
'recursive' => (int)$this->settings['recursive']
));
if (empty($result) || empty($result[$model])) {
return false;