mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Closes #3462, Auth component cause post validation of security component fails.
Fixes #3500, Auth and Security at the same time. input a error username or a error password. the failure redirector will mistake. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5990 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
dbe9beb6cb
commit
a681c99c0f
1 changed files with 8 additions and 1 deletions
|
@ -62,7 +62,14 @@ class Component extends Object {
|
|||
$this->controller =& $controller;
|
||||
if ($this->controller->components !== false) {
|
||||
$loaded = array();
|
||||
$this->controller->components = array_merge(array('Session'), $this->controller->components);
|
||||
|
||||
if(in_array('Security', $this->controller->components)) {
|
||||
$remove = array_flip($this->controller->components);
|
||||
unset($remove['Security']);
|
||||
$this->controller->components = array_merge(array('Session', 'Security'), array_flip($remove));
|
||||
} else {
|
||||
$this->controller->components = array_merge(array('Session'), $this->controller->components);
|
||||
}
|
||||
$loaded = $this->_loadComponents($loaded, $this->controller->components);
|
||||
|
||||
foreach (array_keys($loaded) as $component) {
|
||||
|
|
Loading…
Add table
Reference in a new issue