Fixed local authentication when CAS is not available
git-svn-id: https://rosehill.googlecode.com/svn/trunk@74 100bd78a-fc82-11de-b5bc-ffd2847a4b57
This commit is contained in:
parent
ab0529b7e8
commit
703f49b711
|
@ -6,9 +6,11 @@
|
||||||
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt
|
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt
|
||||||
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
||||||
*/
|
*/
|
||||||
|
if (defined('CAS')) {
|
||||||
if (isset($_REQUEST['return_url'])) {
|
if (isset($_REQUEST['return_url'])) {
|
||||||
$_SESSION['return_url'] = $_REQUEST['return_url'];
|
$_SESSION['return_url'] = $_REQUEST['return_url'];
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once CAS.'/SimpleCAS/Autoload.php';
|
require_once CAS.'/SimpleCAS/Autoload.php';
|
||||||
|
|
||||||
$options = array('hostname'=>CAS_SERVER,'uri'=>CAS_URI);
|
$options = array('hostname'=>CAS_SERVER,'uri'=>CAS_URI);
|
||||||
|
@ -35,3 +37,8 @@ if ($client->isAuthenticated()) {
|
||||||
else {
|
else {
|
||||||
header('Location: '.BASE_URL);
|
header('Location: '.BASE_URL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = new Template();
|
||||||
|
$template->blocks[] = new Block('loginForm.inc');
|
||||||
|
echo $template->render();
|
||||||
|
|
Loading…
Reference in New Issue