aboutsummaryrefslogtreecommitdiffhomepage
path: root/install/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'install/index.php')
-rwxr-xr-xinstall/index.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/install/index.php b/install/index.php
index 1ae782a2..e3965e97 100755
--- a/install/index.php
+++ b/install/index.php
@@ -141,16 +141,16 @@ else if (isset($_POST['install'])) {
141 } 141 }
142 142
143 // create database structure 143 // create database structure
144 $query = executeQuery($handle, $sql_structure, array()); 144 $query = $handle->exec($sql_structure);
145 145
146 // Create user 146 // Create user
147 $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 147 $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
148 148
149 $sql = 'INSERT INTO users (username, password, name) VALUES (?, ?, ?)'; 149 $sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, '')";
150 $params = array($username, $salted_password, $username); 150 $params = array($username, $salted_password, $username);
151 $query = executeQuery($handle, $sql, $params); 151 $query = executeQuery($handle, $sql, $params);
152 152
153 $id_user = $handle->lastInsertId(); 153 $id_user = (int)$handle->lastInsertId('users_id_seq');
154 154
155 $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)'; 155 $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)';
156 $params = array($id_user, 'pager', '10'); 156 $params = array($id_user, 'pager', '10');
@@ -292,9 +292,11 @@ php composer.phar install</code></pre></li>
292 <p> 292 <p>
293 <label for="password">Password</label> 293 <label for="password">Password</label>
294 <input type="password" required id="password" name="password" value="wallabag" /> 294 <input type="password" required id="password" name="password" value="wallabag" />
295 <label for="show">Show password:</label> <input style="margin-left:-80px;" name="show" id="show" type="checkbox" onchange="document.getElementById('password').type = this.checked ? 'text' : 'password'">
295 </p> 296 </p>
296 <p> 297 <p>
297 <label for="show">Show password:</label> <input name="show" id="show" type="checkbox" onchange="document.getElementById('password').type = this.checked ? 'text' : 'password'"> 298 <label for="email">Email (not required)</label>
299 <input type="email" id="email" name="email" />
298 </p> 300 </p>
299 </fieldset> 301 </fieldset>
300 302