- Added new public method getLandingPage to AuthLib.php

- AuthLib->redirectToLandingPage now calls getLandingPage
- Added new controller system/Login.php to perform login operations
- Added new view system/login/usernamePassword.php to login with username and password
- Added css/Login.css, images/logo-300x160.png and js/Login.js to be used by usernamePassword.php
This commit is contained in:
Paolo
2019-03-21 17:00:08 +01:00
parent 400a1adfde
commit f92e32d8f0
6 changed files with 236 additions and 1 deletions
+9 -1
View File
@@ -181,6 +181,14 @@ class AuthLib
* Redirect to the previously stored landing page
*/
public function redirectToLandingPage($altLandingPage = null)
{
$this->_redirectTemporarily($this->getLandingPage($altLandingPage)); // redirect to landing page
}
/**
* Returns the landing page
*/
public function getLandingPage($altLandingPage = null)
{
// Tries to get the previously stored landing page
$landingPage = getSessionElement(self::SESSION_NAME, self::SESSION_LANDING_PAGE);
@@ -200,7 +208,7 @@ class AuthLib
// Clean the previously stored landing page
cleanSessionElement(self::SESSION_NAME, self::SESSION_LANDING_PAGE);
$this->_redirectTemporarily($landingPage); // redirect to landing page
return $landingPage;
}
/**