From 97480fd46ff01163fc0437a3d5965c09ca3a1fa3 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Tue, 29 Nov 2022 12:02:00 +0100 Subject: [PATCH] Fix users not able to see their own content --- src/pages/install.php | 2 +- src/pages/profile.php | 2 +- src/pages/wishlists-saved.php | 2 +- src/update/1-7-2.sql | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/install.php b/src/pages/install.php index d248e9d6..797bc5c5 100644 --- a/src/pages/install.php +++ b/src/pages/install.php @@ -158,7 +158,7 @@ switch ($step) { `password_reset_token` VARCHAR(128) NULL NULL, `password_reset_valid_until` DATETIME NOT NULL DEFAULT NOW(), `last_login` DATETIME NOT NULL DEFAULT NOW(), - `power` INT NOT NULL DEFAULT 0, + `power` INT NOT NULL DEFAULT 1, `birthdate` DATE NULL DEFAULT NULL, `language` VARCHAR(5) NOT NULL DEFAULT "' . DEFAULT_LOCALE . '", `currency` VARCHAR(3) NOT NULL DEFAULT "' . $currencyISO . '", diff --git a/src/pages/profile.php b/src/pages/profile.php index 10d5f1e4..6aac9840 100644 --- a/src/pages/profile.php +++ b/src/pages/profile.php @@ -8,7 +8,7 @@ namespace wishthis; -$page = new Page(__FILE__, __('Profile')); +$page = new Page(__FILE__, __('Profile'), 1); if (isset($_POST['user-id'], $_POST['section'])) { $set = array(); diff --git a/src/pages/wishlists-saved.php b/src/pages/wishlists-saved.php index 82131ff3..de31fade 100644 --- a/src/pages/wishlists-saved.php +++ b/src/pages/wishlists-saved.php @@ -8,7 +8,7 @@ namespace wishthis; -$page = new Page(__FILE__, __('Remembered lists')); +$page = new Page(__FILE__, __('Remembered lists'), 1); $page->header(); $page->bodyStart(); $page->navigation(); diff --git a/src/update/1-7-2.sql b/src/update/1-7-2.sql index 1312bf69..60c14b0d 100644 --- a/src/update/1-7-2.sql +++ b/src/update/1-7-2.sql @@ -23,4 +23,6 @@ AFTER UPDATE `users` SET - `currency` = `language`; + `power` = 1 +WHERE + `power` = 0;