Changing default login page to route name

This commit is contained in:
rootcoma 2013-12-05 15:56:00 -08:00
parent e2473598ad
commit 7d06632672
2 changed files with 3 additions and 3 deletions

View File

@ -33,4 +33,4 @@ $config['baseRoute'] = '';
/**
* Default page after logging in
*/
$config['defaultLoginRedirectPage'] = "/";
$config['defaultLoginRedirectPage'] = "home";

View File

@ -16,7 +16,7 @@ class LoginController extends Controller
if(array_key_exists('lastPage', $_SESSION)) {
$this->redirect($_SESSION('lastPage'));
} else {
$this->redirect($defaultPage);
$this->redirect($this->container->router->generate($defaultPage));
}
}
@ -64,6 +64,6 @@ class LoginController extends Controller
$this->container->login = new Login($this->container->storage);
$this->container->setNotice("<strong>Success!</strong> You have been successfully logged out.");
$this->redirect($this->container->getConfig()['defaultLoginRedirectPage']);
$this->doRedirect();
}
}