diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index 858e71c62..b15914f11 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -272,10 +272,6 @@ class AuthComponent extends Object { $this->data = $controller->data = $this->hashPasswords($controller->data); - if ($this->allowedActions == array('*') || in_array($controller->action, $this->allowedActions)) { - return false; - } - if (!isset($controller->params['url']['url'])) { $url = ''; } else { @@ -283,6 +279,11 @@ class AuthComponent extends Object { } $this->loginAction = Router::normalize($this->loginAction); + + if ($this->loginAction != Router::normalize($url) && ($this->allowedActions == array('*') || in_array($controller->action, $this->allowedActions))) { + return false; + } + if ($this->loginAction == Router::normalize($url)) { if (empty($controller->data) || !isset($controller->data[$this->userModel])) { if (!$this->Session->check('Auth.redirect') && env('HTTP_REFERER')) { diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index 768964a1b..1468aa02e 100644 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -135,11 +135,7 @@ class FormHelper extends AppHelper { } } } - $this->fieldset = array( - 'fields' => $fields, - 'key' => $object->primaryKey, - 'validates' => $validates - ); + $this->fieldset = array('fields' => $fields, 'key' => $object->primaryKey, 'validates' => $validates); } $data = $this->fieldset;