Browse Source

Fix last commit.

pull/40/head
Michael Foster 11 years ago
parent
commit
cc37d79c0d
  1. 6
      inc/mod/pages.php

6
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));

Loading…
Cancel
Save