From 8c9aff90b6e0a935188b20060dbdcbe9f7aeb28f Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sun, 19 Sep 2021 14:27:03 +0200 Subject: Pre-select the current user in page/post form Pre-select the user with the user ID of the current session in the forms for creating a page or a post. This fixes the problem that occurs if one have multiple users in the database, but the create forms were not using the *current* logged-in user as the default selected user. The forms for modifying a page or post are not affected because they use the ID from "$FORM['DATA']['USER']" for selecting the correct user. This key is undefined on the create forms, so we use "$_SESSION['USER_ID']" for selecting the default user for creating new pages and posts. --- theme/admin/html/post/form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'theme/admin/html/post') diff --git a/theme/admin/html/post/form.php b/theme/admin/html/post/form.php index e4df2ba..d2a22eb 100644 --- a/theme/admin/html/post/form.php +++ b/theme/admin/html/post/form.php @@ -57,8 +57,9 @@ function categorySelectList($category_tree, $selected = NULL, $prefix = '') {
-- cgit v1.2.3