diff options
| Commit | fb2645d444729d656a209ef586a13fb569429280 (patch) | |
|---|---|---|
| Author | 2021-04-03 18:27:33 +0300 | |
| Committer | 2021-04-03 18:27:33 +0300 | |
| Files | 91daafcdb8af6cd41551bbf442f4be77dee575a4 /src/controllers/DashboardLoginController.php | |
| devrix-job-board-1.0.tar devrix-job-board-1.0.tar.gz devrix-job-board-1.0.zip | ||
| Parent | 67bc860ea4b3db5033a42038ab86d0df955c9295 (diff) | |
| Parent | 3b0cbc90e3046a8bb979c2b9a17fae5a94bb2707 (diff) | |
Merge pull request #3 from Syndamia/dev v1.0
Exam version finished
1 files changed, 7 insertions, 4 deletions
| -rw-r--r-- | src/controllers/DashboardLoginController.php | 11 |
diff --git a/src/controllers/DashboardLoginController.php b/src/controllers/DashboardLoginController.php index fe2009b..c6ac070 100644 --- a/src/controllers/DashboardLoginController.php +++ b/src/controllers/DashboardLoginController.php @@ -6,20 +6,23 @@ class DashboardLoginController extends BaseController { private static $message; public static function get() { - include "views/dashboard-login.php"; + include('views/dashboard-login.php'); } public static function post() { + // The dashboard(controller) doesn't have it's own URI (and all requests are sent in this controller), so + // we can't send a request directly to dashboard. + // This does compromise security, but for now it will have to do. if (isset($_POST['_method'])) { DashboardController::invoke(); } - else if ($_POST['username'] == "admin" && $_POST['password'] == "admin") { + else if ($_POST['username'] == 'admin' && $_POST['password'] == 'admin') { // Load normal dashboard DashboardController::get(); } else { - self::$message = "Bad credentials!"; - include "views/dashboard-login.php"; + self::$message = 'Bad credentials!'; + include('views/dashboard-login.php'); } } } |
