closes #5172, AuthComponent login with with UUID

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7396 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-07-31 19:00:12 +00:00
parent 7ce4bd4131
commit 4a5282bcd7
2 changed files with 79 additions and 17 deletions

View file

@ -283,7 +283,7 @@ class AuthComponent extends Object {
}
} elseif (isset($controller->params['url']['url'])) {
$url = $controller->params['url']['url'];
}
}
$url = Router::normalize($url);
$loginAction = Router::normalize($this->loginAction);
@ -763,7 +763,7 @@ class AuthComponent extends Object {
if (empty($data) || empty($data[$this->userModel])) {
return null;
}
} elseif (is_numeric($user)) {
} elseif (!empty($user)) {
$model =& $this->getModel();
$data = $model->find(array_merge(array($model->escapeField() => $user), $conditions));
@ -772,7 +772,7 @@ class AuthComponent extends Object {
}
}
if (isset($data) && !empty($data)) {
if (!empty($data)) {
if (!empty($data[$this->userModel][$this->fields['password']])) {
unset($data[$this->userModel][$this->fields['password']]);
}