## Preparations
In the `modules\in-news\units\articles\articles_event_handler.php` replace line `$resource_ids[] = $category_data['ResourceId'];` with:
$resource_ids[] = $category_data['ResourceId'];
$category = $this->Application->recallObject('c', null, array('skip_autoload' => true));
$category->SetDBField('l1_Name', 'Test_' . time());
$category->SetDBField('ParentId', $category_id);
$category->Create();
In the `core\units\mailing_lists\mailing_lists_config.php` add `PortalUserId` field to the `Default` grid:
'PortalUserId' => Array ('filter_block' => 'grid_like_filter', 'title' => 'la_col_FromUser'),
In the `core\units\spam_reports\spam_reports_config.php` add `ReportedById` field to the `Default` grid:
'ReportedById' => Array ('filter_block' => 'grid_like_filter', 'title' => 'la_col_FromUser'),
In the `themes\advanced\platform\designs\default_design.des.tpl` add after <body> tag:
Created By: <inp2:st_Field name="CreatedById"/>, Modified By: <inp2:st_Field name="ModifiedById"/>.
In the `modules\in-commerce\units\products\products_config.php` add `CreatedByIdId` field to the `Default` grid:
'CreatedById' => array('filter_block' => 'grid_like_filter', 'title' => 'la_fld_CreatedById'),
In the `tools\run_event.php` comment out line:
exit_code(1, 'This script needs to be enabled manually !');
## Testing
# Go to {nav Website & Content > Structure & Data} section
# Select News category, edit it's `Properties` tab, input Source URL: some valid rss url
# Select News category, edit it's Custom tab, input Source URL: some valid rss url.# Enable n:OnUpdateRSSArticles scheduled task execution in the {nav Configuration > Website > Scheduled Tasks} section
# Confirm that new automatic articles appears with Author = system.
# Confirm that new categories with names "Test_{some number}" created under News category, and fot that "Test_" categories Created By = 'system';
# Disable n:OnUpdateRSSArticles scheduled task execution in the {nav Configuration > Website > Scheduled Tasks} section
# Run the "php tools/run_event.php n:OnUpdateRSSArticles b674006f3edb1d9cd4d838c150b0567d" in the root folder of a project
# Confirm that new categories with names "Test_{some number}" created under News category, and fot that "Test_" categories Created By = 'system';
# Go to {nav Logs & Reports > System Log} section
# Confirm that no SQL error happens
# Go to {nav User Management > Mailings} section
# Add some record
# Go to {nav Tools > Query Database} section
# Run SQL like `UPDATE inp_MailingLists SET PortalUserId = -3;`
# Confirm that `system` value is shown in the `From User` column of `Mailings` grid
# Go to {nav Tools > Query Database} section
# Run SQL like `INSERT INTO inp_SpamReports VALUES (DEFAULT, 'p', '1', 'Test', UNIX_TIMESTAMP(), '-3');
# Go to {nav Logs & Reports >SPAM Reports} section
# Confirm that `system` value is shown in the `From User` column
# UPDATE inp_Categories SET CreatedById = -3, ModifiedById = -3;
# Go to {nav Tools > Query Database} section
# Run SQL like `UPDATE inp_Categories SET CreatedById = -3, ModifiedById = -3;`
# Open front-end index page.
# Confirm text appeared in the top of page: `Created By: system, Modified By: system`.
# Go to {nav Tools > Query Database} section
# Run SQL: UPDATE inp_EmailTemplates SET BindToSystemEvent = 'u:OnCreate' WHERE TemplateId = 1
# Run SQL: INSERT INTO `inp_SystemEventSubscriptions` (`SubscriptionId`, `EmailTemplateId`, `SubscriberEmail`, `UserId`, `CategoryId`, `IncludeSublevels`, `ItemId`, `ParentItemId`, `SubscribedOn`) VALUES (NULL, 1, '', '-3', NULL, '1', NULL, NULL, NULL)
# Go to {nav User Management > User Subscriptions} section
# Confirm that `system` value is shown in the `User ID` and `Username` columns
# Go to {nav E-commerce > Orders} section
# Create some order
# Go to {nav Tools > Query Database} section
# Run SQL: UPDATE inp_Orders SET PortalUserId = -3
# Go to {nav E-commerce > Orders} section
# Confirm that orders have `system` value in the `Customer Name` column
# Go to {nav Website & Content1 > Products} section
# Create some product
# Go to {nav Tools > Query Database} section
# Run SQL: UPDATE inp_Products SET CreatedById = -3
# Confirm that products have `system` value in the `Created By` column