mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Implementing AuthComponent::$autoRedirect()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4483 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
8a025938b5
commit
a1afe34106
1 changed files with 1 additions and 2 deletions
|
@ -191,7 +191,6 @@ class AuthComponent extends Object {
|
|||
if ($this->allowedActions == array('*') || in_array($controller->action, $this->allowedActions)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isset($controller->params['url']['url'])) {
|
||||
$url = '';
|
||||
} else {
|
||||
|
@ -207,7 +206,7 @@ class AuthComponent extends Object {
|
|||
$this->userModel . '.' . $this->fields['username'] => '= ' . $controller->data[$this->userModel][$this->fields['username']],
|
||||
$this->userModel . '.' . $this->fields['password'] => '= ' . $controller->data[$this->userModel][$this->fields['password']]
|
||||
);
|
||||
if ($this->login($data)) {
|
||||
if ($this->login($data) && $this->autoRedirect) {
|
||||
$controller->redirect($this->redirect(), null, true);
|
||||
} else {
|
||||
$this->Session->setFlash($this->loginError, 'default', array(), 'Auth.login');
|
||||
|
|
Loading…
Reference in a new issue