Skip to content

Commit

Permalink
Do not display IP in MCP
Browse files Browse the repository at this point in the history
  • Loading branch information
tas2580 committed Apr 14, 2018
1 parent 82ee7a2 commit fd18bef
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions event/listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public static function getSubscribedEvents()
'core.modify_posting_parameters' => 'modify_posting_parameters',
'core.page_header_after' => 'page_header_after',
'core.acp_main_notice' => 'acp_main_notice',
'core.mcp_post_template_data' => 'mcp_post_template_data',
);
}

Expand Down Expand Up @@ -271,6 +272,24 @@ public function page_header_after()
}
}

/**
* Do not display IP in MCP
*
* @param object $event The event object
* @return null
* @access public
*/
public function mcp_post_template_data($event)
{
// Do not display IP in MCP
if ($this->config['tas2580_privacyprotection_anonymize_ip'])
{
$mcp_post_template_data = $event['mcp_post_template_data'];
$mcp_post_template_data['S_CAN_VIEWIP'] = false;
$event['mcp_post_template_data'] = $mcp_post_template_data;
}
}

/**
* Display option to allow massemail on register
*
Expand Down

0 comments on commit fd18bef

Please sign in to comment.