mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-23 17:42:15 -05:00
Merge branch 'issue-844' of https://github.com/rros/wallabag into dev
This commit is contained in:
commit
b37110cc82
@ -141,16 +141,16 @@ else if (isset($_POST['install'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create database structure
|
// create database structure
|
||||||
$query = executeQuery($handle, $sql_structure, array());
|
$query = $handle->exec($sql_structure);
|
||||||
|
|
||||||
// Create user
|
// Create user
|
||||||
$handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$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);
|
$params = array($username, $salted_password, $username);
|
||||||
$query = executeQuery($handle, $sql, $params);
|
$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 (?, ?, ?)';
|
$sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)';
|
||||||
$params = array($id_user, 'pager', '10');
|
$params = array($id_user, 'pager', '10');
|
||||||
|
Loading…
Reference in New Issue
Block a user