mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 23:49:55 +00:00
Adding missing 'recursive' option to DigestAuthenticate object.
Used integer casting in _findUser() method for 'recursive' option.
This commit is contained in:
parent
664b0538b8
commit
79cab67be7
2 changed files with 3 additions and 2 deletions
|
@ -82,7 +82,7 @@ abstract class BaseAuthenticate {
|
||||||
}
|
}
|
||||||
$result = ClassRegistry::init($userModel)->find('first', array(
|
$result = ClassRegistry::init($userModel)->find('first', array(
|
||||||
'conditions' => $conditions,
|
'conditions' => $conditions,
|
||||||
'recursive' => $this->settings['recursive']
|
'recursive' => (int)$this->settings['recursive']
|
||||||
));
|
));
|
||||||
if (empty($result) || empty($result[$model])) {
|
if (empty($result) || empty($result[$model])) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -78,6 +78,7 @@ class DigestAuthenticate extends BaseAuthenticate {
|
||||||
),
|
),
|
||||||
'userModel' => 'User',
|
'userModel' => 'User',
|
||||||
'scope' => array(),
|
'scope' => array(),
|
||||||
|
'recursive' => 0,
|
||||||
'realm' => '',
|
'realm' => '',
|
||||||
'qop' => 'auth',
|
'qop' => 'auth',
|
||||||
'nonce' => '',
|
'nonce' => '',
|
||||||
|
@ -166,7 +167,7 @@ class DigestAuthenticate extends BaseAuthenticate {
|
||||||
}
|
}
|
||||||
$result = ClassRegistry::init($userModel)->find('first', array(
|
$result = ClassRegistry::init($userModel)->find('first', array(
|
||||||
'conditions' => $conditions,
|
'conditions' => $conditions,
|
||||||
'recursive' => 0
|
'recursive' => (int)$this->settings['recursive']
|
||||||
));
|
));
|
||||||
if (empty($result) || empty($result[$model])) {
|
if (empty($result) || empty($result[$model])) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue