diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php index 8d4acb7d..7569b986 100644 --- a/inc/8chan-mod-pages.php +++ b/inc/8chan-mod-pages.php @@ -118,7 +118,7 @@ $salt = generate_salt(); $password = hash('sha256', $salt . sha1($_POST['password'])); - $query = prepare('INSERT INTO ``mods`` VALUES (NULL, :username, :password, :salt, 19, :board)'); + $query = prepare('INSERT INTO ``mods`` VALUES (NULL, :username, :password, :salt, 19, :board, "")'); $query->bindValue(':username', $_POST['username']); $query->bindValue(':password', $password); $query->bindValue(':salt', $salt); diff --git a/inc/mod/pages.php b/inc/mod/pages.php index c24312f8..54356489 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -2122,12 +2122,13 @@ function mod_user_new() { $salt = generate_salt(); $password = hash('sha256', $salt . sha1($_POST['password'])); - $query = prepare('INSERT INTO ``mods`` VALUES (NULL, :username, :password, :salt, :type, :boards)'); + $query = prepare('INSERT INTO ``mods`` VALUES (NULL, :username, :password, :salt, :type, :boards, :email)'); $query->bindValue(':username', $_POST['username']); $query->bindValue(':password', $password); $query->bindValue(':salt', $salt); $query->bindValue(':type', $type); $query->bindValue(':boards', implode(',', $boards)); + $query->bindValue(':email', (isset($_POST['email']) ? $_POST['email'] : '')); $query->execute() or error(db_error($query)); $userID = $pdo->lastInsertId();