Added routes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
require_once "../../../bootstrap.php";
|
||||
require "../../../bootstrap.php";
|
||||
|
||||
use Backend\Models\Group;
|
||||
use Backend\Models\Password;
|
||||
@@ -25,24 +25,26 @@ if(isset($_POST['login'])){
|
||||
$_SESSION['groupName'] = $groupName;
|
||||
$_SESSION['token'] = $token;
|
||||
$_SESSION['success'] = "You are now logged in";
|
||||
//header('location: ../../../Frontend/index.php?login=success');
|
||||
echo "YES";
|
||||
header('location: ../../../Frontend/index.php?login=success');
|
||||
exit();
|
||||
}
|
||||
else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed&?reason=token');
|
||||
exit();
|
||||
}
|
||||
|
||||
}else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed&?reason=password');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
session_destroy();
|
||||
header('location: ../../../Frontend/index.php?login=failed&?reason=group');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user