Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to delete moderation notes #10529

Merged
merged 6 commits into from May 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion applications/dashboard/controllers/class.usercontroller.php
Expand Up @@ -550,7 +550,10 @@ public function delete($userID = '', $method = '') {
}

if ($this->Form->authenticatedPostBack(true) && $method != '') {
$userModel->deleteID($userID, ['DeleteMethod' => $method]);
$userModel->deleteID(
$userID,
['DeleteMethod' => $method, 'DeleteModerationInfo' => $this->Form->getFormValue('DeleteModerationInfo')]
);
$this->View = 'deletecomplete';
}

Expand Down
1 change: 0 additions & 1 deletion applications/dashboard/views/user/delete.php
Expand Up @@ -18,5 +18,4 @@
<div class="label-wrap-wide"><?php echo t('UserDeleteMessage', "Delete the user and completely remove all of the user's content. This may cause discussions to be disjointed. Best option for removing spam."); ?></div>
<div class="input-wrap-right"><?php echo anchor(t('UserDelete', 'Delete User Content'), 'user/delete/'.$this->User->UserID.'/delete', 'btn btn-secondary js-modal', ['data-css-class' => 'modal-sm']); ?></div>
</div>

<?php } ?>
3 changes: 2 additions & 1 deletion applications/dashboard/views/user/deleteconfirm.php
Expand Up @@ -15,7 +15,8 @@
else if ($this->Method == 'wipe')
echo t("All of the user content will be replaced with a message stating the user has been deleted.");
else
echo t("The user content will be completely deleted.");
echo t("The user content will be completely deleted."),
$this->Form->checkBox('DeleteModerationInfo', t('Delete moderation information'), ['value' => '1']);
?>
</div>
<?php
Expand Down