<?php
class Auth {

    public static function check() {
        session_start();
        if (!isset($_SESSION['user'])) {
            header("Location: " . APP_PATH . "login");
            exit;
        }
    }

    public static function logout() {
        session_start();
        session_destroy();
        header("Location: " . APP_PATH . "login");
        exit;
    }
}
