Fix last commit.
This commit is contained in:
parent
eea4e42609
commit
cc37d79c0d
@ -1629,8 +1629,8 @@ function mod_user_new() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_POST['type'] = (int) $_POST['type'];
|
$type = (int)$_POST['type'];
|
||||||
if ($_POST['type'] !== JANITOR && $_POST['type'] !== MOD && $_POST['type'] !== ADMIN)
|
if (!isset($config['mod']['groups'][$type]) || $type == DISABLED)
|
||||||
error(sprintf($config['error']['invalidfield'], 'type'));
|
error(sprintf($config['error']['invalidfield'], 'type'));
|
||||||
|
|
||||||
$salt = generate_salt();
|
$salt = generate_salt();
|
||||||
@ -1640,7 +1640,7 @@ function mod_user_new() {
|
|||||||
$query->bindValue(':username', $_POST['username']);
|
$query->bindValue(':username', $_POST['username']);
|
||||||
$query->bindValue(':password', $password);
|
$query->bindValue(':password', $password);
|
||||||
$query->bindValue(':salt', $salt);
|
$query->bindValue(':salt', $salt);
|
||||||
$query->bindValue(':type', $_POST['type']);
|
$query->bindValue(':type', $type);
|
||||||
$query->bindValue(':boards', implode(',', $boards));
|
$query->bindValue(':boards', implode(',', $boards));
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user