]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix #1093
authorThomas Citharel <tcit@tcit.fr>
Tue, 17 Feb 2015 10:03:17 +0000 (11:03 +0100)
committerThomas Citharel <tcit@tcit.fr>
Tue, 17 Feb 2015 10:03:17 +0000 (11:03 +0100)
install/index.php

index 94cf50ac2d6925cfc8538c3919abb3eff9068f94..d514eb2a41216a8806bc6cdc6210784523a82d46 100755 (executable)
@@ -12,6 +12,7 @@ $errors = array();
 $successes = array();
 
 $final = false;
+$email = "";
 
 require_once('install_functions.php');
 
@@ -61,6 +62,7 @@ else if (isset($_POST['install'])) {
         // User informations
         $username = trim($_POST['username']);
         $password = trim($_POST['password']);
+        $email = trim($_POST['email']);
         $salted_password = sha1($password . $username . $salt);
 
         // Database informations
@@ -140,8 +142,8 @@ else if (isset($_POST['install'])) {
 
 
     if ($continue) {
-        $sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, '')";
-        $params = array($username, $salted_password, $username);
+        $sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, ?)";
+        $params = array($username, $salted_password, $username, $email);
         $query = executeQuery($handle, $sql, $params);
 
         $id_user = (int)$handle->lastInsertId('users_id_seq');