Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 3de72baeb1d911aecbea51006f815742696b3c9f 1 parent 929ed57
@markstory markstory authored
View
2  lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
@@ -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])) {
View
2  lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.