<?php
/**
 * Slate — admin logout.
 */
require_once dirname(__DIR__) . '/config.php';

if (Auth::check()) {
    AuditLog::record('logout', Auth::user()['email']);
    Auth::logout();
}

header('Location: ' . SLATE_URL . '/admin/login.php');
exit;
