import local files into repo
This commit is contained in:
34
public/lucidAuth.login.php
Normal file
34
public/lucidAuth.login.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
|
||||
include_once('../include/lucidAuth.functions.php');
|
||||
|
||||
echo $settings->Debug['Verbose'];
|
||||
|
||||
if ($_POST['do'] == 'login') {
|
||||
$result = authenticateLDAP($_POST['username'], $_POST['password']);
|
||||
if ($result['status'] == 'Success') {
|
||||
// Since this request is only ever called through an AJAX-request; return JSON object
|
||||
echo '{"Result":"Success","Location":"<originalurl>"}' . PHP_EOL;
|
||||
} else {
|
||||
switch ($result['reason']) {
|
||||
case '1':
|
||||
echo '{"Result":"Fail","Reason":"Invalid username and/or password"}' . PHP_EOL;
|
||||
break;
|
||||
default:
|
||||
echo '{"Result":"Fail","Reason":"Uncaught error"}' . PHP_EOL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$stylevar['content']['top'] = '-125px';
|
||||
$stylevar['content']['margin-left'] = '-225px';
|
||||
$stylevar['content']['height'] = '220px';
|
||||
$stylevar['content']['width'] = '450px';
|
||||
|
||||
include_once('../include/lucidAuth.template.php');
|
||||
|
||||
$pageLayout = str_replace('<!--REPL_MAIN-->', $contentLayout['login'], $pageLayout);
|
||||
echo $pageLayout;
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user