aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-02-17 11:03:17 +0100
committerThomas Citharel <tcit@tcit.fr>2015-02-17 11:03:17 +0100
commitd61e86a3d38e3d0c84718858a42741e5a13ec328 (patch)
tree3ee7a46a9fc6a8502c12788ed7dc09d375bf9458
parentcdee5e65701330e0b740640f471228d8b9b02a91 (diff)
downloadwallabag-d61e86a3d38e3d0c84718858a42741e5a13ec328.tar.gz
wallabag-d61e86a3d38e3d0c84718858a42741e5a13ec328.tar.zst
wallabag-d61e86a3d38e3d0c84718858a42741e5a13ec328.zip
fix #1093
-rwxr-xr-xinstall/index.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/install/index.php b/install/index.php
index 94cf50ac..d514eb2a 100755
--- a/install/index.php
+++ b/install/index.php
@@ -12,6 +12,7 @@ $errors = array();
12$successes = array(); 12$successes = array();
13 13
14$final = false; 14$final = false;
15$email = "";
15 16
16require_once('install_functions.php'); 17require_once('install_functions.php');
17 18
@@ -61,6 +62,7 @@ else if (isset($_POST['install'])) {
61 // User informations 62 // User informations
62 $username = trim($_POST['username']); 63 $username = trim($_POST['username']);
63 $password = trim($_POST['password']); 64 $password = trim($_POST['password']);
65 $email = trim($_POST['email']);
64 $salted_password = sha1($password . $username . $salt); 66 $salted_password = sha1($password . $username . $salt);
65 67
66 // Database informations 68 // Database informations
@@ -140,8 +142,8 @@ else if (isset($_POST['install'])) {
140 142
141 143
142 if ($continue) { 144 if ($continue) {
143 $sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, '')"; 145 $sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, ?)";
144 $params = array($username, $salted_password, $username); 146 $params = array($username, $salted_password, $username, $email);
145 $query = executeQuery($handle, $sql, $params); 147 $query = executeQuery($handle, $sql, $params);
146 148
147 $id_user = (int)$handle->lastInsertId('users_id_seq'); 149 $id_user = (int)$handle->lastInsertId('users_id_seq');