mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
adding validation to AuthComponent::identify()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5692 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
603ed0e39c
commit
c8d3fe4a4e
1 changed files with 4 additions and 3 deletions
|
@ -736,9 +736,10 @@ class AuthComponent extends Object {
|
|||
);
|
||||
}
|
||||
$model =& $this->getModel();
|
||||
|
||||
$model->set($find);
|
||||
if($model->validates()) {
|
||||
$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