Move login check in inc/mod/auth.php to a function

This allows pages like create.php to not include inc/mod/pages.php while still being able to use the mod auth functions (like generating salts and passwords)
This commit is contained in:
8chan authored and czaks committed 2016-05-05 11:40:52 +02:00
1 parent 93f748e6a8
commit 3eb755ee7e
3 files changed
+49 -33

No files matched your search

+1
View File
@@ -216,6 +216,7 @@ if (isset($_POST['delete'])) {
if ($post['mod'] = isset($_POST['mod']) && $_POST['mod']) {
require 'inc/mod/auth.php';
check_login(false);
if (!$mod) {
// Liar. You're not a mod.
error($config['error']['notamod']);