mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-30 19:40:30 +00:00
Fix the PostgreSQL install errors
This commit is contained in:
parent
a15108e65b
commit
0dc4797a4c
1 changed files with 3 additions and 3 deletions
|
@ -141,16 +141,16 @@ else if (isset($_POST['install'])) {
|
|||
}
|
||||
|
||||
// create database structure
|
||||
$query = executeQuery($handle, $sql_structure, array());
|
||||
$query = $handle->exec($sql_structure);
|
||||
|
||||
// Create user
|
||||
$handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$sql = 'INSERT INTO users (username, password, name) VALUES (?, ?, ?)';
|
||||
$sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, '')";
|
||||
$params = array($username, $salted_password, $username);
|
||||
$query = executeQuery($handle, $sql, $params);
|
||||
|
||||
$id_user = $handle->lastInsertId();
|
||||
$id_user = (int)$handle->lastInsertId('users_id_seq');
|
||||
|
||||
$sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)';
|
||||
$params = array($id_user, 'pager', '10');
|
||||
|
|
Loading…
Reference in a new issue