diff options
Diffstat (limited to 'install')
-rwxr-xr-x | install/index.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/install/index.php b/install/index.php index 1ae782a2..ba7c4b0f 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'); |