Index: src/wp-includes/functions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-includes/functions.php	(revision 43008)
+++ src/wp-includes/functions.php	(date 1524839848000)
@@ -6230,6 +6230,9 @@
 			/* translators: deleted long text */
 			$anonymous = __( 'This content was deleted by the author.' );
 			break;
+        case 'user_id':
+            $anonymous = _wp_privacy_get_anonymous_user_id();
+            break;
 		default:
 			$anonymous = '';
 	}
@@ -6253,5 +6256,35 @@
  * @access private 
  */
 function _wp_privacy_active_plugins_change() {
-	update_option( '_wp_privacy_text_change_check', 'check' );
+	get_option( '_wp_privacy_text_change_check', 'check' );
+}
+
+/**
+ * Adds an anonymous user to the database if none exists, and returns the users ID to anonymize.
+ *
+ * @since 4.9.6
+ *
+ * @return int $anonymous_user_id  ID if the anonymous user, or 0 if user could not be created.
+ */
+function _wp_privacy_get_anonymous_user_id()
+{
+    $anonymous_user_id = (int) get_option('_anonymous_user_id');
+
+    if ( ! $anonymous_user_id ) {
+        $anonymous_user_id = wp_insert_user(array(
+            'user_login' => 'anonymous',
+            'user_pass' => NULL,
+            'user_nicename' => __('Anonymous'),
+            'user_email' => wp_privacy_anonymize_data('email', ''),
+            'display_name' => __('Anonymous'),
+            'description' => __('Anonymous user used to assign posts to when the user requested deletion though privacy tools.'),
+            'role' => 'anonymous_user', // Does not exist. This should prevent the user from logging in or getting into wp_admin by all means.
+        ));
+
+        if (!is_wp_error($anonymous_user_id)) {
+            update_option('_anonymous_user_id', (int) $anonymous_user_id);
+        }
+    }
+
+    return is_wp_error($anonymous_user_id) ? 0 : $anonymous_user_id;
 }
