mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 10:36:16 +00:00
Made Auth component find conditions more explicit, closes #4680
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6936 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
943ede837c
commit
abe853a978
1 changed files with 4 additions and 4 deletions
|
@ -732,16 +732,16 @@ class AuthComponent extends Object {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$find = array(
|
$find = array(
|
||||||
$this->fields['username'] => $user[$this->fields['username']],
|
$this->userModel.'.'.$this->fields['username'] => $user[$this->fields['username']],
|
||||||
$this->fields['password'] => $user[$this->fields['password']]
|
$this->userModel.'.'.$this->fields['password'] => $user[$this->fields['password']]
|
||||||
);
|
);
|
||||||
} elseif (isset($user[$this->userModel . '.' . $this->fields['username']]) && !empty($user[$this->userModel . '.' . $this->fields['username']])) {
|
} elseif (isset($user[$this->userModel . '.' . $this->fields['username']]) && !empty($user[$this->userModel . '.' . $this->fields['username']])) {
|
||||||
if (trim($user[$this->userModel . '.' . $this->fields['username']]) == '=' || trim($user[$this->userModel . '.' . $this->fields['password']]) == '=') {
|
if (trim($user[$this->userModel . '.' . $this->fields['username']]) == '=' || trim($user[$this->userModel . '.' . $this->fields['password']]) == '=') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$find = array(
|
$find = array(
|
||||||
$this->fields['username'] => '= ' . $user[$this->userModel . '.' . $this->fields['username']],
|
$this->userModel.'.'.$this->fields['username'] => '= ' . $user[$this->userModel . '.' . $this->fields['username']],
|
||||||
$this->fields['password'] => '= ' . $user[$this->userModel . '.' . $this->fields['password']]
|
$this->userModel.'.'.$this->fields['password'] => '= ' . $user[$this->userModel . '.' . $this->fields['password']]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue