From 96f4e1b3a8b2b0bf2c8002b98eb685b79d90643d Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 24 Oct 2022 00:07:05 +0200 Subject: [PATCH] Fix typo in config, default group on registration and edit comparison --- config/config.default.php | 2 +- includes/pages/admin_user.php | 2 +- includes/pages/guest_login.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.default.php b/config/config.default.php index ef2c4ee7..b04688c7 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -17,7 +17,7 @@ return [ // Enable maintenance mode (show a static page) 'maintenance' => (bool)env('MAINTENANCE', false), - // Application name (not the event name!) + // Application name (not the event name) 'app_name' => env('APP_NAME', 'Engelsystem'), // Set to development to enable debugging messages diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 5db38912..9f3c2f6b 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -135,7 +135,7 @@ function admin_user() } $angel_highest_group = DB::selectOne( - 'SELECT `group_id` FROM `UserGroups` WHERE `uid`=? ORDER BY `group_id` LIMIT 1', + 'SELECT group_id FROM `UserGroups` WHERE `uid`=? ORDER BY `group_id` DESC LIMIT 1', [$user_id] ); if (!empty($angel_highest_group)) { diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index e0f7f474..1898e599 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -299,7 +299,7 @@ function guest_register() } // Assign user-group and set password - Db::insert('INSERT INTO `UserGroups` (`uid`, `group_id`) VALUES (?, -20)', [$user->id]); + Db::insert('INSERT INTO `UserGroups` (`uid`, `group_id`) VALUES (?, 20)', [$user->id]); if ($enable_password) { auth()->setPassword($user, $request->postData('password')); }