mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Issue #3175 GDPR work.
This commit is contained in:
@@ -554,5 +554,22 @@ class usersettings_shortcodes extends e_shortcode
|
||||
|
||||
}
|
||||
|
||||
function sc_deleteaccountbutton($parm=array())
|
||||
{
|
||||
|
||||
if((int) $_GET['id'] !== USERID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$confirm = defset("LAN_USET_51", "Are you sure? This procedure cannot be reversed! Once completed all personal data that you have entered on this site will be permanently lost and you will no longer be able to login.");
|
||||
$label = defset('LAN_USET_50', "Delete All Account Information");
|
||||
|
||||
$parm['confirm'] = $confirm;
|
||||
|
||||
return e107::getForm()->button('delete_account',1, 'delete', $label, $parm);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@@ -173,6 +173,7 @@ $USERSETTINGS_EDIT = "
|
||||
</table>
|
||||
<div>
|
||||
{UPDATESETTINGSBUTTON}
|
||||
{DELETEACCOUNTBUTTON}
|
||||
</div>
|
||||
</div>
|
||||
";
|
||||
@@ -303,6 +304,7 @@ $USERSETTINGS_TEMPLATE['edit'] = "
|
||||
<div class='form-group'>
|
||||
<div class='col-sm-offset-3 col-sm-9'>
|
||||
{UPDATESETTINGSBUTTON}
|
||||
{DELETEACCOUNTBUTTON}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -3148,7 +3148,7 @@ class e_form
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return $this->admin_button($name, $value, $action, $label, $options);
|
||||
|
||||
@@ -3253,6 +3253,13 @@ class e_form
|
||||
$include = (deftrue("FONTAWESOME")) ? "data-loading-icon='fa-spinner' data-disable='true'" : "";
|
||||
}
|
||||
|
||||
$confirmation = LAN_JSCONFIRM;
|
||||
|
||||
if(!empty($options['confirm']))
|
||||
{
|
||||
$confirmation = $options['confirm'];
|
||||
}
|
||||
|
||||
$options = $this->format_options('admin_button', $name, $options);
|
||||
|
||||
$options['class'] = vartrue($options['class']);
|
||||
@@ -3277,7 +3284,10 @@ class e_form
|
||||
|
||||
case 'delete':
|
||||
case 'danger':
|
||||
$options['other'] = 'data-confirm="'.LAN_JSCONFIRM.'"';
|
||||
|
||||
|
||||
|
||||
$options['other'] = 'data-confirm="'.$confirmation.'"';
|
||||
break;
|
||||
|
||||
case 'batch':
|
||||
|
@@ -145,4 +145,6 @@ define("LAN_CUSTOMTITLE", "Custom title");
|
||||
define("LAN_USET_5", "Subscribed to");
|
||||
define("LAN_USET_6", "Subscribe to our mailing-list(s) and/or sections of this site.");
|
||||
// define("LAN_USET_8", "Signature / Time zone");
|
||||
?>
|
||||
|
||||
define("LAN_USET_50", "Delete Account");
|
||||
define("LAN_USET_51", "Are you sure? This procedure cannot be reversed! Once completed, your account and any personal data that you have entered on this site will be permanently lost and you will no longer be able to login.");
|
@@ -788,6 +788,19 @@ $.ajaxSetup({
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
|
||||
// Basic Delete Confirmation
|
||||
$('input.delete,button.delete,a[data-confirm]').click(function(){
|
||||
answer = confirm($(this).attr("data-confirm"));
|
||||
return answer; // answer is a boolean
|
||||
});
|
||||
|
||||
$(".e-confirm").click(function(){
|
||||
answer = confirm($(this).attr("title"));
|
||||
return answer; // answer is a boolean
|
||||
});
|
||||
|
||||
|
||||
//check all
|
||||
$("#check-all").click(function(event){
|
||||
var val = $(this).val(), selector = '.field-spacer';
|
||||
|
@@ -69,7 +69,7 @@ class usersettings_front // Begin Usersettings rewrite.
|
||||
function __construct()
|
||||
{
|
||||
|
||||
if(deftrue('BOOTSTRAP')===3)
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$template = e107::getCoreTemplate('usersettings','', true, true); // always merge
|
||||
|
||||
@@ -172,6 +172,11 @@ class usersettings_front // Begin Usersettings rewrite.
|
||||
$adminEdit = false; // @deprecated // FALSE if editing own data. TRUE if admin edit
|
||||
|
||||
|
||||
if(!empty($_POST['delete_account']))
|
||||
{
|
||||
echo e107::getMessage()->addWarning("This feature is currently under development. Your data has not been modified")->render(); // do not LAN.
|
||||
}
|
||||
|
||||
/* todo subject of removal */
|
||||
if(is_numeric(e_QUERY))
|
||||
{ // Trying to edit specific user record
|
||||
|
Reference in New Issue
Block a user