realfan/public/logout/index.php

13 lines
242 B
PHP
Raw Normal View History

2021-11-27 01:52:54 +00:00
<?php require '/src/base.php' ?>
<?php
if ($valid_cookie) {
$sm = $db->prepare('DELETE FROM oauth_tokens WHERE cookie = ?');
$sm->execute([$cookie]);
if ($sm->rowCount() === 1) {
setcookie('rf_sess', null);
}
}
header('Location: /');