From ee8a49a32d379cf3681c5ba37e31f95ba7b4e4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 23 Jan 2014 13:09:59 +0100 Subject: [PATCH] [add] insert into users {poche/password} --- src/Poche/Schema.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Poche/Schema.php b/src/Poche/Schema.php index 534409d..709b43c 100644 --- a/src/Poche/Schema.php +++ b/src/Poche/Schema.php @@ -36,6 +36,7 @@ class Schema id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, username TEXT DEFAULT 'poche', password TEXT, + roles TEXT DEFAULT '', email TEXT, language TEXT DEFAULT 'en_US', items_per_page INTEGER DEFAULT 100, @@ -48,11 +49,11 @@ class Schema ) "); - //$db->query(" - // INSERT INTO users - // (password) - // VALUES ('".\password_hash('poche', PASSWORD_BCRYPT)."') - //"); + $db->query(" + INSERT INTO users + (password, roles) + VALUES ('BFEQkknI/c+Nd7BaG7AaiyTfUFby/pkMHy3UsYqKqDcmvHoPRX/ame9TnVuOV2GrBH0JK9g4koW+CgTYI9mK+w==', 'ROLE_USER') + "); $db->query(' CREATE TABLE entries (