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
2014-12-31 22:35:21 -08:00
committed by czaks
parent 93f748e6a8
commit 3eb755ee7e
3 changed files with 49 additions and 33 deletions

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']);