aboutsummaryrefslogtreecommitdiffhomepage
path: root/install
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-09-28 17:48:06 +0200
committertcit <tcit@tcit.fr>2014-09-28 17:48:06 +0200
commitb37110cc820df17775b208030e4744d7667b3428 (patch)
treef63be57f8c7576be2cb9cfbdb7b4d8cd6b6af0b3 /install
parentcde2fc38428f61a396110a443f9ab848b2858c39 (diff)
parent0dc4797a4cbc91467ec2d9816d102942ddc0605f (diff)
downloadwallabag-b37110cc820df17775b208030e4744d7667b3428.tar.gz
wallabag-b37110cc820df17775b208030e4744d7667b3428.tar.zst
wallabag-b37110cc820df17775b208030e4744d7667b3428.zip
Merge branch 'issue-844' of https://github.com/rros/wallabag into dev
Diffstat (limited to 'install')
-rwxr-xr-xinstall/index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/install/index.php b/install/index.php
index 9ed62de1..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');