mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-12 20:49:50 +00:00
reverting change to AuthComponent::identify(); adding patch from #3222
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5693 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c8d3fe4a4e
commit
e5aef425a6
1 changed files with 3 additions and 5 deletions
|
@ -717,7 +717,6 @@ class AuthComponent extends Object {
|
|||
}
|
||||
|
||||
if (is_array($user) && (isset($user[$this->fields['username']]) || isset($user[$this->userModel . '.' . $this->fields['username']]))) {
|
||||
$find = array();
|
||||
if (isset($user[$this->fields['username']]) && !empty($user[$this->fields['username']]) && !empty($user[$this->fields['password']])) {
|
||||
if (trim($user[$this->fields['username']]) == '=' || trim($user[$this->fields['password']]) == '=') {
|
||||
return false;
|
||||
|
@ -734,12 +733,11 @@ class AuthComponent extends Object {
|
|||
$this->fields['username'] => $user[$this->userModel . '.' . $this->fields['username']],
|
||||
$this->fields['password'] => $user[$this->userModel . '.' . $this->fields['password']]
|
||||
);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
$model =& $this->getModel();
|
||||
$model->set($find);
|
||||
if($model->validates()) {
|
||||
$data = $model->find(am($find, $this->userScope), null, null, -1);
|
||||
}
|
||||
$data = $model->find(am($find, $this->userScope), null, null, -1);
|
||||
if (empty($data) || empty($data[$this->userModel])) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue