S2OJ/web/app/controllers/logout.php

13 lines
188 B
PHP
Raw Permalink Normal View History

2016-07-18 16:39:37 +00:00
<?php
2022-11-06 02:26:21 +00:00
crsf_defend();
Auth::logout();
?>
2016-07-18 16:39:37 +00:00
<script type="text/javascript">
2022-11-06 02:26:21 +00:00
var prevUrl = document.referrer;
if (!prevUrl) {
prevUrl = '/';
};
window.location.href = prevUrl;
2016-07-18 16:39:37 +00:00
</script>