Summary Files Commits Branches @commit @diff @stats
path: root / src / controllers / DashboardLoginController.php
diff options
context:
space:
mode:
1 files changed, 6 insertions, 2 deletions
-rw-r--r--src/controllers/DashboardLoginController.php8
diff --git a/src/controllers/DashboardLoginController.php b/src/controllers/DashboardLoginController.php
index 8c1cc67..eb6f323 100644
--- a/src/controllers/DashboardLoginController.php
+++ b/src/controllers/DashboardLoginController.php
@@ -6,11 +6,15 @@ class DashboardLoginController extends BaseController {
private static $message;
public static function get() {
- include "views/dashboard-login.php";
+ // include "views/dashboard-login.php";
+ DashboardController::invoke();
}
public static function post() {
- if ($_POST['username'] == "admin" && $_POST['password'] == "admin") {
+ if (isset($_POST['_method'])) {
+ DashboardController::invoke();
+ }
+ else if ($_POST['username'] == "admin" && $_POST['password'] == "admin") {
// Probably a bad practice, but couldn't find if it is
$_SERVER['REQUEST_METHOD'] = "GET";
// Load normal dashboard