cleanup and sync
This commit is contained in:
+4
-4
@@ -3,7 +3,7 @@
|
||||
if (!isset($_GET['action']))
|
||||
header('Location: .');
|
||||
|
||||
include_once('includes/functions.php');
|
||||
include_once ('includes/functions.php');
|
||||
|
||||
$action = $_GET['action'];
|
||||
|
||||
@@ -16,7 +16,7 @@ switch ($action) {
|
||||
if (empty($_POST['login_username']) || empty($_POST['login_password']))
|
||||
header('Location: ' . $error_location . 'empty');
|
||||
|
||||
include_once('fields/login_fields.php');
|
||||
include_once ('fields/login_fields.php');
|
||||
// If field inputs are invalid, redirect to login with error state.
|
||||
foreach ($_POST as $field => $value) {
|
||||
if (!validate($value, $login_fields[$field]['validators']))
|
||||
@@ -34,7 +34,7 @@ switch ($action) {
|
||||
unset($_POST['login_password']);
|
||||
|
||||
// auth() handles setting $_SESSION variables, user is now OK to proceed to home.php.
|
||||
// header('Location: ' . $success_location);
|
||||
header('Location: ' . $success_location);
|
||||
default:
|
||||
// code...
|
||||
break;
|
||||
@@ -42,7 +42,7 @@ switch ($action) {
|
||||
|
||||
function validate($input, $validators)
|
||||
{
|
||||
include_once('includes/input_validation.php');
|
||||
include_once ('includes/input_validation.php');
|
||||
|
||||
foreach ($validators as $v) {
|
||||
switch ($v) {
|
||||
|
||||
Reference in New Issue
Block a user