Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Controllers;
- class Login extends \App\Controller
- {
- protected function action()
- {
- $authorization = new \App\Models\Authorization();
- $view = new \App\View();
- if (!isset($_POST['login']) && !isset($_POST['password']) || !$authorization->checkPassword($_POST['login'], $_POST['password'])) {
- $view->display($_SERVER['DOCUMENT_ROOT'] . '/App/Templates/Authorization.php');
- return;
- } $authorization->checkPassword($_POST['login'], $_POST['password']);
- $authorization->setCurrentUser($_POST['login']);
- header('Location:/Admin/index.php');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement