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:
nate 2007-02-08 23:44:58 +00:00
parent a1afe34106
commit 24fd9b1e9b

View file

@ -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;