<?php

namespace App\Controllers;

class Login {
    static function isLogin() {
        if (isset($_SESSION['login']) && $_SESSION['login'] === 1) {
            return true;
        }
        return false;
    }

    static function login($password, $hash) {
        if (password_verify($password, $hash)) {
            $_SESSION['login'] = 1;
            return true;
        }
        return false;
    }
}