mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Removing password data from user record access in AuthComponent
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4484 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
a1afe34106
commit
24fd9b1e9b
1 changed files with 5 additions and 1 deletions
|
@ -479,7 +479,6 @@ class AuthComponent extends Object {
|
|||
if (empty($data) || empty($data[$this->userModel])) {
|
||||
return null;
|
||||
}
|
||||
return $data[$this->userModel];
|
||||
} else if (is_numeric($user)) {
|
||||
// Assume it's a user's ID
|
||||
$model =& $this->getUserModel();
|
||||
|
@ -488,6 +487,11 @@ class AuthComponent extends Object {
|
|||
if (empty($data) || empty($data[$this->userModel])) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (isset($data) && !empty($data)) {
|
||||
if(!empty($data[$this->userModel][$this->fields['password']])) {
|
||||
unset($data[$this->userModel][$this->fields['password']]);
|
||||
}
|
||||
return $data[$this->userModel];
|
||||
} else {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue