Commit 4d863799 authored by Eric Windham's avatar Eric Windham Committed by Kenny Hall

Gdpr data request data removal (#3559)

* new form templates and actions for GDPR stuff

* added code for deleting user data

* finished with export data functionality

* made suggested changes to wording

* made changes to wording for templates, actions, and html fields

* made commenting changes requested

* made translation changes

* Modified the deletedata and exportdata templates to make the email address required and changed the texted in the email action.

* made styling changes

* fixed template page styling
parent 1b3cc2ff
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -102,10 +102,13 @@ th {
flex-wrap: wrap;
& > div {
display: flex;
width: 50%;
}
.template {
display: grid;
width: 100%;
a {
color: #424242;
display: block;
......
<?php if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Class NF_Actions_DataRemoval
*/
final class NF_Actions_DeleteDataRequest extends NF_Abstracts_Action
{
/**
* @var string
*/
protected $_name = 'deletedatarequest';
/**
* @var array
*/
protected $_tags = array();
/**
* @var string
*/
protected $_timing = 'late';
/**
* @var int
*/
protected $_priority = 10;
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->_nicename = __( 'Delete Data Request', 'ninja-forms' );
$settings = Ninja_Forms::config( 'ActionDeleteDataRequestSettings' );
$this->_settings = array_merge( $this->_settings, $settings );
}
/*
* PUBLIC METHODS
*/
public function save( $action_settings )
{
}
/**
* Creates a Erase Personal Data request for the user with the email
* provided
*
* @param $action_settings
* @param $form_id
* @param $data
*
* @return array
*/
public function process( $action_settings, $form_id, $data )
{
$data = array();
if( isset( $data['settings']['is_preview'] ) && $data['settings']['is_preview'] ){
return $data;
}
// get the email setting
$email = $action_settings[ 'email' ];
// create request for user
$request_id = wp_create_user_request( $email,
'remove_personal_data' );
/**
* Basically ignore if we get a user error as it will be one of two
* things.
*
* 1) The email in question is already in the erase data request queue
* 2) The email does not belong to an actual user.
*/
if( ! $request_id instanceof WP_Error ) {
// send the request if it's not an error.
wp_send_user_request( $request_id );
}
return $data;
}
}
<?php if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Class NF_Actions_ExportPersonalData
*/
final class NF_Actions_ExportDataRequest extends NF_Abstracts_Action
{
/**
* @var string
*/
protected $_name = 'exportdatarequest';
/**
* @var array
*/
protected $_tags = array();
/**
* @var string
*/
protected $_timing = 'late';
/**
* @var int
*/
protected $_priority = 10;
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->_nicename = __( 'Export Data Request', 'ninja-forms' );
$settings = Ninja_Forms::config( 'ActionExportDataRequestSettings' );
$this->_settings = array_merge( $this->_settings, $settings );
}
/*
* PUBLIC METHODS
*/
public function save( $action_settings )
{
}
/**
* Creates a Export Personal Data request for the user with the email
* provided
*
* @param $action_settings
* @param $form_id
* @param $data
*
* @return array
*/
public function process( $action_settings, $form_id, $data )
{
$data = array();
if( isset( $data['settings']['is_preview'] ) && $data['settings']['is_preview'] ){
return $data;
}
// get the email setting
$email = $action_settings[ 'email' ];
// create request for user
$request_id = wp_create_user_request( $email,
'export_personal_data' );
/**
* Basically ignore if we get a user error as it will be one of two
* things.
*
* 1) The email in question is already in the erase data request queue
* 2) The email does not belong to an actual user.
*/
if( ! $request_id instanceof WP_Error ) {
wp_send_user_request( $request_id );
}
return $data;
}
}
<?php if ( ! defined( 'ABSPATH' ) ) exit;
class NF_Admin_UserDataRequests {
/** Class constructor */
public function __construct() {
add_filter( 'wp_privacy_personal_data_exporters', array(
$this, 'plugin_register_exporters' ) );
add_filter( 'wp_privacy_personal_data_erasers', array(
$this, 'plugin_register_erasers' ) );
}
/**
* Register exporter for Plugin user data.
*
* @param array $exporters
*
* @return array
*/
function plugin_register_exporters( $exporters = array() ) {
$exporters[] = array(
'exporter_friendly_name' => __( 'Ninja Forms Submission Data', 'ninja-forms' ),
'callback' => array( $this, 'plugin_user_data_exporter' ),
);
return $exporters;
}
/**
* Register eraser for Plugin user data.
*
* @param array $erasers
*
* @return array
*/
function plugin_register_erasers( $erasers = array() ) {
$erasers[] = array(
'eraser_friendly_name' => __( 'Ninja Forms Submissions Data', 'ninja-forms' ),
'callback' => array( $this, 'plugin_user_data_eraser' ),
);
return $erasers;
}
/**
* Adds Ninja Forms Submission data to the default HTML export file that
* WordPress creates on converted request
*
* @param $email_address
* @param int $page
*
* @return array
*/
function plugin_user_data_exporter( $email_address, $page = 1 ) {
$export_items = array();
// get the user
$user = get_user_by( 'email', $email_address );
if ( $user && $user->ID ) {
$item_id = "ninja-forms-" . $user->ID;
$group_id = 'ninja-forms';
$group_label = __( 'Ninja Forms Submission Data', 'ninja-forms' );
// we get the submissions the old-fashioned way
$subs = get_posts(
array(
'author' => $user->ID,
'post_type' => 'nf_sub',
'posts_per_page' => -1
)
);
foreach($subs as $sub) {
$data = array();
// get the field values from postmeta
$sub_meta = get_post_meta( $sub->ID );
// make sure we have a form submission
if ( isset( $sub_meta[ '_form_id' ] ) ) {
$form = Ninja_Forms()->form( $sub_meta[ '_form_id' ][ 0 ] )
->get();
$fields = Ninja_Forms()->form( $sub_meta[ '_form_id' ][ 0 ] )
->get_fields();
foreach ( $fields as $field_id => $field ) {
// we don't care about submit fields
if ( 'submit' != $field->get_setting( 'type' ) ) {
// make sure there is a value
if ( isset( $sub_meta[ '_field_' . $field_id ] ) ) {
//listcheckbox fields may need to be unserialized
if( 'listcheckbox' == $field->get_setting( 'type' ) ) {
//implode the unserialized array
$value = implode( ',', maybe_unserialize(
$sub_meta[ '_field_' . $field_id ][ 0 ] ));
} else {
$value = $sub_meta[ '_field_' . $field_id ][ 0 ];
}
// Add label/value pairs to data array
$data[] = array(
'name' => $field->get_setting( 'label' ),
'value' => $value
);
}
}
}
// Add this group of items to the exporters data array.
$export_items[] = array(
'group_id' => $group_id . '-' . $sub->ID,
'group_label' => $group_label . '-' .
$form->get_setting( 'title' ),
'item_id' => $item_id . '-' . $sub->ID,
'data' => $data,
);
}
}
// Returns an array of exported items for this pass, but also a boolean whether this exporter is finished.
//If not it will be called again with $page increased by 1.
return array(
'data' => $export_items,
'done' => true,
);
}
}
/**
* Eraser for Plugin user data. This will completely erase all Ninja Form
* submission data for the user when converted by the admin.
*
* @param $email_address
* @param int $page
*
* @return array
*/
function plugin_user_data_eraser( $email_address, $page = 1 ) {
if ( empty( $email_address ) ) {
return array(
'items_removed' => false,
'items_retained' => false,
'messages' => array(),
'done' => true,
);
}
// get the user
$user = get_user_by( 'email', $email_address );
$messages = array();
$items_removed = false;
$items_retained = false;
if ( $user && $user->ID ) {
// get submissions the old-fashioned way
$subs = get_posts(
array(
'author' => $user->ID,
'post_type' => 'nf_sub',
'posts_per_page' => -1
)
);
if( 0 < sizeof( $subs ) ) {
$items_removed = true;
}
// iterate and delete the submissions
foreach($subs as $sub) {
wp_delete_post( $sub->ID, true );
}
}
// Returns an array of exported items for this pass, but also a boolean whether this exporter is finished.
//If not it will be called again with $page increased by 1.
return array(
'items_removed' => $items_removed,
'items_retained' => $items_retained,
'messages' => $messages,
'done' => true,
);
}
}
\ No newline at end of file
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
}
return apply_filters( 'ninja_forms_action_deletedatarequest_settings', array(
'message' => array(
'name' => 'message',
'type' => 'html',
'group' => 'primary',
'label' => __( 'This is a message', 'ninja-forms' ),
'value' => __( 'This action adds users to WordPress\' personal data delete tool, allowing admins to comply with the GDPR and other privacy regulations from the site\'s front end.', 'ninja-forms' ),
'width' => 'full',
'use_merge_tags' => true,
),
'email' => array(
'name' => 'email',
'type' => 'textbox',
'group' => 'primary',
'label' => __( 'Email', 'ninja-forms' ),
'placeholder' => __( 'Email address field', 'ninja-forms' ),
'width' => 'one-half',
'use_merge_tags' => true,
),
) );
\ No newline at end of file
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
}
return apply_filters( 'ninja_forms_action_exportdatarequest_settings', array(
'message' => array(
'name' => 'message',
'type' => 'html',
'group' => 'primary',
'label' => __( 'This is a message', 'ninja-forms' ),
'value' => __( 'This action adds users to WordPress\' personal data export tool, allowing admins to comply with the GDPR and other privacy regulations from the site\'s front end.', 'ninja-forms' ),
'width' => 'full',
'use_merge_tags' => true,
),
'email' => array(
'name' => 'email',
'type' => 'textbox',
'group' => 'primary',
'label' => __( 'Email', 'ninja-forms' ),
'placeholder' => __( 'Email address field', 'ninja-forms' ),
'width' => 'one-half',
'use_merge_tags' => true,
),
) );
\ No newline at end of file
......@@ -55,6 +55,18 @@ $templates = array(
'title' => __( 'Job Application', 'ninja-forms' ),
'template-desc' => __( 'Allow users to apply for a job. You can add and remove fields as needed.', 'ninja-forms' ),
),
'formtemplate-deletedata' => array(
'id' => 'formtemplate-deletedata',
'title' => __( 'Delete Data Request', 'ninja-forms' ),
'template-desc' => __( 'Includes action to add users to WordPress\' personal data delete tool, allowing admins to comply with the GDPR and other privacy regulations from the site\'s front end.', 'ninja-forms' ),
),
'formtemplate-exportdata' => array(
'id' => 'formtemplate-exportdata',
'title' => __( 'Export Data Request', 'ninja-forms' ),
'template-desc' => __( 'Includes action to add users to WordPress\' personal data export tool, allowing admins to comply with the GDPR and other privacy regulations from the site\'s front end.', 'ninja-forms' ),
),
);
$ads = array(
......
{"settings":{"objectType":"Form Setting","editActive":false,"title":"Delete Data Request","show_title":1,"clear_complete":1,"hide_complete":1,"default_label_pos":"above","wrapper_class":"","element_class":"","key":"","add_submit":0,"currency":"","unique_field_error":"A form with this value has already been submitted.","logged_in":false,"not_logged_in_msg":"","sub_limit_msg":"The form has reached its submission limit.","calculations":[],"container_styles_show_advanced_css":0,"title_styles_show_advanced_css":0,"row_styles_show_advanced_css":0,"row-odd_styles_show_advanced_css":0,"success-msg_styles_show_advanced_css":0,"error_msg_styles_show_advanced_css":0,"save_progress_allow_multiple":false,"save_progress_table_legend":"Load saved progress","save_progress_table_columns":[{"errors":[],"max_options":0,"label":"Column Title","field":"{field}","order":0,"settingModel":{"settings":false,"hide_merge_tags":false,"error":false,"name":"save_progress_table_columns","type":"option-repeater","label":"Save Table Columns <a href=\"#\" class=\"nf-add-new\">Add New<\/a>","width":"full","group":"primary","columns":{"field":{"header":"Field Key","default":""}},"value":[{"label":"Column Title","field":"{field}","order":0}],"tmpl_row":"tmpl-nf-save-progress-table-columns-repeater-row"}}],"conditions":[],"mp_breadcrumb":1,"mp_progress_bar":1,"mp_display_titles":0,"breadcrumb_container_styles_show_advanced_css":0,"breadcrumb_buttons_styles_show_advanced_css":0,"breadcrumb_button_hover_styles_show_advanced_css":0,"breadcrumb_active_button_styles_show_advanced_css":0,"progress_bar_container_styles_show_advanced_css":0,"progress_bar_fill_styles_show_advanced_css":0,"part_titles_styles_show_advanced_css":0,"navigation_container_styles_show_advanced_css":0,"previous_button_styles_show_advanced_css":0,"next_button_styles_show_advanced_css":0,"navigation_hover_styles_show_advanced_css":0,"formContentData":["html_1526653696048","email_1526653697888","submit_1526653702241"],"created_at":"2018-05-22 14:49:42"},"fields":[{"objectType":"Field","objectDomain":"fields","editActive":false,"order":999,"type":"html","label":"HTML","default":"<p>Submit this form to request personal data deletion from the site administrator.<\/p>","container_class":"","element_class":"","wrap_styles_show_advanced_css":0,"label_styles_show_advanced_css":0,"element_styles_show_advanced_css":0,"key":"html_1526653696048","cellcid":"c4613","drawerDisabled":false,"created_at":"2018-05-22 14:49:42"},{"objectType":"Field","objectDomain":"fields","editActive":false,"order":999,"type":"email","label":"Email","key":"email_1526653697888","label_pos":"default","required":1,"default":"{wp:user_email}","placeholder":"","container_class":"","element_class":"","admin_label":"","help_text":"","custom_name_attribute":"email","wrap_styles_show_advanced_css":0,"label_styles_show_advanced_css":0,"element_styles_show_advanced_css":0,"cellcid":"c4698","drawerDisabled":false,"created_at":"2018-05-22 14:49:42"},{"objectType":"Field","objectDomain":"fields","editActive":false,"order":999,"type":"submit","label":"Submit","processing_label":"Processing","container_class":"","element_class":"","key":"submit_1526653702241","wrap_styles_show_advanced_css":0,"element_styles_show_advanced_css":0,"submit_element_hover_styles_show_advanced_css":0,"cellcid":"c4771","created_at":"2018-05-22 14:49:42"}],"actions":[{"title":null,"key":null,"type":"save","active":"1","created_at":"2018-05-22 14:49:43","objectType":"Action","objectDomain":"actions","editActive":"","label":"Store Submission","order":"3","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"message":"This action allows users to make a request to receive an export of all of their data on your site. This is in accordance to the GDPR and other privacy regulations.","payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","to":"{wp:admin_email}","reply_to":"","email_subject":"Ninja Forms Submission","email_message":"{fields_table}","email_message_plain":"","from_name":"","from_address":"","email_format":"html","cc":"","bcc":"","redirect_url":""},{"title":null,"key":null,"type":"successmessage","active":"1","created_at":"2018-05-22 14:49:43","objectType":"Action","objectDomain":"actions","editActive":"","label":"Success Message","message":"Your form has been successfully submitted.","order":"1","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","to":"{wp:admin_email}","reply_to":"","email_subject":"Ninja Forms Submission","email_message":"{fields_table}","email_message_plain":"","from_name":"","from_address":"","email_format":"html","cc":"","bcc":"","redirect_url":"","success_msg":"Your form has been successfully submitted."},{"title":null,"key":null,"type":"deletedatarequest","active":"1","created_at":"2018-05-22 14:49:43","objectType":"Action","objectDomain":"actions","editActive":"","label":"Delete Data Request","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"email":"{field:email_1526653697888}","message":"This action adds users to WordPress' personal data delete tool, allowing admins to comply with the GDPR and other privacy regulations from the site's front end.","payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","drawerDisabled":""},{"title":null,"key":null,"type":"email","active":"1","created_at":"2018-05-22 14:49:43","objectType":"Action","objectDomain":"actions","editActive":"","label":"Admin Email","order":"2","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"message":"This action allows users to make a request that their data on your site be erased. This is in accordance to the GDPR and other privacy regulations.","payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","to":"{wp:admin_email}","reply_to":"","email_subject":"Ninja Forms Submission","email_message":"<p>{field:email_1526653697888} has requested all data you have collected from them be deleted on&nbsp;{wp:site_url}.&nbsp;<\/p>","email_message_plain":"","from_name":"","from_address":"","email_format":"html","cc":"","bcc":"","drawerDisabled":""}]}
\ No newline at end of file
{"settings":{"objectType":"Form Setting","editActive":false,"title":"Data Export Request","show_title":1,"clear_complete":1,"hide_complete":1,"default_label_pos":"above","wrapper_class":"","element_class":"","key":"","add_submit":0,"currency":"","unique_field_error":"A form with this value has already been submitted.","logged_in":false,"not_logged_in_msg":"","sub_limit_msg":"The form has reached its submission limit.","calculations":[],"container_styles_show_advanced_css":0,"title_styles_show_advanced_css":0,"row_styles_show_advanced_css":0,"row-odd_styles_show_advanced_css":0,"success-msg_styles_show_advanced_css":0,"error_msg_styles_show_advanced_css":0,"save_progress_allow_multiple":false,"save_progress_table_legend":"Load saved progress","save_progress_table_columns":[{"errors":[],"max_options":0,"label":"Column Title","field":"{field}","order":0,"settingModel":{"settings":false,"hide_merge_tags":false,"error":false,"name":"save_progress_table_columns","type":"option-repeater","label":"Save Table Columns <a href=\"#\" class=\"nf-add-new\">Add New<\/a>","width":"full","group":"primary","columns":{"field":{"header":"Field Key","default":""}},"value":[{"label":"Column Title","field":"{field}","order":0}],"tmpl_row":"tmpl-nf-save-progress-table-columns-repeater-row"}}],"conditions":[],"mp_breadcrumb":1,"mp_progress_bar":1,"mp_display_titles":0,"breadcrumb_container_styles_show_advanced_css":0,"breadcrumb_buttons_styles_show_advanced_css":0,"breadcrumb_button_hover_styles_show_advanced_css":0,"breadcrumb_active_button_styles_show_advanced_css":0,"progress_bar_container_styles_show_advanced_css":0,"progress_bar_fill_styles_show_advanced_css":0,"part_titles_styles_show_advanced_css":0,"navigation_container_styles_show_advanced_css":0,"previous_button_styles_show_advanced_css":0,"next_button_styles_show_advanced_css":0,"navigation_hover_styles_show_advanced_css":0,"formContentData":["html_1526653797195","email_1526653801502","submit_1526653802436"],"created_at":"2018-05-22 14:52:39"},"fields":[{"objectType":"Field","objectDomain":"fields","editActive":false,"order":999,"type":"html","label":"HTML","default":"<p>Submit this form to request a personal data export from the site administrator.<br><\/p>","container_class":"","element_class":"","wrap_styles_show_advanced_css":0,"label_styles_show_advanced_css":0,"element_styles_show_advanced_css":0,"key":"html_1526653797195","cellcid":"c4613","drawerDisabled":false,"created_at":"2018-05-22 14:52:39"},{"objectType":"Field","objectDomain":"fields","editActive":false,"order":999,"type":"email","label":"Email","key":"email_1526653801502","label_pos":"default","required":1,"default":"{wp:user_email}","placeholder":"","container_class":"","element_class":"","admin_label":"","help_text":"","custom_name_attribute":"email","wrap_styles_show_advanced_css":0,"label_styles_show_advanced_css":0,"element_styles_show_advanced_css":0,"cellcid":"c4698","drawerDisabled":false,"created_at":"2018-05-22 14:52:39"},{"objectType":"Field","objectDomain":"fields","editActive":false,"order":999,"type":"submit","label":"Submit","processing_label":"Processing","container_class":"","element_class":"","key":"submit_1526653802436","wrap_styles_show_advanced_css":0,"element_styles_show_advanced_css":0,"submit_element_hover_styles_show_advanced_css":0,"cellcid":"c4771","created_at":"2018-05-22 14:52:39","drawerDisabled":false}],"actions":[{"title":null,"key":null,"type":"save","active":"1","created_at":"2018-05-22 14:52:40","objectType":"Action","objectDomain":"actions","editActive":"","label":"Store Submission","order":"3","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"message":"This action allows users to make a request to receive an export of all of their data on your site. This is in accordance to the GDPR and other privacy regulations.","payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","to":"{wp:admin_email}","reply_to":"","email_subject":"Ninja Forms Submission","email_message":"{fields_table}","email_message_plain":"","from_name":"","from_address":"","email_format":"html","cc":"","bcc":"","redirect_url":"","exception_fields":[],"fields-save-toggle":"save_all"},{"title":null,"key":null,"type":"successmessage","active":"1","created_at":"2018-05-22 14:52:40","objectType":"Action","objectDomain":"actions","editActive":"","label":"Success Message","message":"Your form has been successfully submitted.","order":"1","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","to":"{wp:admin_email}","reply_to":"","email_subject":"Ninja Forms Submission","email_message":"{fields_table}","email_message_plain":"","from_name":"","from_address":"","email_format":"html","cc":"","bcc":"","redirect_url":"","success_msg":"Your form has been successfully submitted.","fields-save-toggle":"save_all","exception_fields":[]},{"title":null,"key":null,"type":"exportdatarequest","active":"1","created_at":"2018-05-22 14:52:40","objectType":"Action","objectDomain":"actions","editActive":"","label":"Export Data Request","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"email":"{field:email_1526653801502}","message":"This action adds users to WordPress' personal data export tool, allowing admins to comply with the GDPR and other privacy regulations from the site's front end.","payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","to":"{wp:admin_email}","reply_to":"","email_subject":"Ninja Forms Submission","email_message":"{fields_table}","email_message_plain":"","from_name":"","from_address":"","email_format":"html","cc":"","bcc":"","drawerDisabled":""},{"title":null,"key":null,"type":"email","active":"1","created_at":"2018-05-22 14:52:40","objectType":"Action","objectDomain":"actions","editActive":"","label":"Admin Email","order":"2","conditions":{"collapsed":false,"process":1,"connector":"all","when":[{"connector":"AND","key":"","comparator":"","value":"","type":"field","modelType":"when"}],"then":[{"key":"","trigger":"","value":"","type":"field","modelType":"then"}],"else":[]},"message":"This action allows users to make a request that their data on your site be erased. This is in accordance to the GDPR and other privacy regulations.","payment_gateways":"","payment_total":"0","ppe_details":"","api_keys":"To edit your API keys, <a href=\"http:\/\/ninjadev.local\/wp-admin\/admin.php?page=nf-settings#nf-stripe\" target=\"_blank\" >click here<\/a>.","tag":"","to":"{wp:admin_email}","reply_to":"","email_subject":"Ninja Forms Data Export Request","email_message":"<p>{field:email_1526653801502} has requested an export of the data you have collected from them on&nbsp;{wp:site_url}.&nbsp;<br><\/p>","email_message_plain":"","from_name":"","from_address":"","email_format":"html","cc":"","bcc":"","drawerDisabled":""}]}
\ No newline at end of file
......@@ -295,6 +295,11 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
*/
new NF_Admin_Metaboxes_Calculations();
/*
* User data requests ( GDPR actions )
*/
new NF_Admin_UserDataRequests();
/*
* Logger
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment