forked from leftypol/leftypol
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:
parent
93f748e6a8
commit
3eb755ee7e
3 changed files with 49 additions and 33 deletions
1
post.php
1
post.php
|
@ -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']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue