summaryrefslogtreecommitdiff
path: root/inc/mod/pages.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-09 01:38:32 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-09 01:38:32 +1000
commitcc37d79c0dea9921a89968e4f5a36241d282d869 (patch)
treee80bd6f187bc8523ad56e2f2aee15bc81a851266 /inc/mod/pages.php
parenteea4e42609e319b38f14bca9f31cc3327ffaf175 (diff)
Fix last commit.
Diffstat (limited to 'inc/mod/pages.php')
-rw-r--r--inc/mod/pages.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index af8f7466..5af6dc10 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -1629,8 +1629,8 @@ function mod_user_new() {
}
}
- $_POST['type'] = (int) $_POST['type'];
- if ($_POST['type'] !== JANITOR && $_POST['type'] !== MOD && $_POST['type'] !== ADMIN)
+ $type = (int)$_POST['type'];
+ if (!isset($config['mod']['groups'][$type]) || $type == DISABLED)
error(sprintf($config['error']['invalidfield'], 'type'));
$salt = generate_salt();
@@ -1640,7 +1640,7 @@ function mod_user_new() {
$query->bindValue(':username', $_POST['username']);
$query->bindValue(':password', $password);
$query->bindValue(':salt', $salt);
- $query->bindValue(':type', $_POST['type']);
+ $query->bindValue(':type', $type);
$query->bindValue(':boards', implode(',', $boards));
$query->execute() or error(db_error($query));