From bdc464726bf781f6dfda435d1228910d458215c0 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 21 Nov 2004 21:28:18 +0000 Subject: [PATCH] Preserve author ID when editing pages. Bug 480. Hat tip: adsworth git-svn-id: https://develop.svn.wordpress.org/trunk@1873 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/post.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index 19ba67c17e..baa3c9216b 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -235,7 +235,11 @@ case 'editpost': $post_title = $_POST['post_title']; $prev_status = $_POST['prev_status']; $post_status = $_POST['post_status']; - $post_author = (int) $_POST['post_author']; + if (! empty($_POST['post_author'])) { + $post_author = (int) $_POST['post_author']; + } else { + $post_author = (int) $_POST['user_ID']; + } if ( !user_can_edit_user($user_ID, $post_author) ) die( __('You cannot post as this user.') );