X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-del_user.php;h=ea2e825b48355e59734326e6c23cb4634c51520c;hb=c5173c4d66be7ec72fbf8051a2097cbb377e87a0;hp=5992aa065720cae2db5abe5c0f605a40cd5fd270;hpb=23eb012842e1c027a0f2af20693685caebb5638a;p=mailer.git
diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php
index 5992aa0657..ea2e825b48 100644
--- a/inc/modules/admin/what-del_user.php
+++ b/inc/modules/admin/what-del_user.php
@@ -1,7 +1,7 @@
".ADMIN_DEL_COMPLETED."");
+ deleteUserAccount(getRequestParameter('userid'), postRequestParameter('reason'));
+
+ // Output message
+ loadTemplate('admin_settings_saved', false, '{--ADMIN_DELETE_COMPLETED--}');
} else {
// Account does not exists!
- OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."");
+ loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))));
}
-} elseif (!empty($_POST['no'])) {
+} elseif (isPostRequestParameterSet('no')) {
// Do not delete him...
- LOAD_URL("modules.php?module=admin&what=list_user&u_id=".$_GET['u_id']);
-} elseif (empty($_GET['u_id'])) {
+ redirectToUrl(adminCreateUserLink(getRequestParameter('userid')));
+} elseif (!isGetRequestParameterSet('userid')) {
// Output selection form with all confirmed user accounts listed
- ADD_MEMBER_SELECTION_BOX();
+ addMemberSelectionBox();
} else {
// Realy want to delete?
- $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- // Load data
- list ($email, $sname, $fname) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- // Transfer data to constants for the template
- define('__EMAIL', CREATE_EMAIL_LINK($email, "user_data"));
- define('__SNAME', $sname);
- define('__FNAME', $fname);
- define('__UID' , $_GET['u_id']);
+ if (fetchUserData(getRequestParameter('userid'))) {
+ // Prepare content
+ $content = array(
+ 'email' => generateEmailLink(getUserData('email'), 'user_data'),
+ 'userid' => bigintval(getRequestParameter('userid'))
+ );
// Display form
- LOAD_TEMPLATE("admin_del_user");
+ loadTemplate('admin_delete_user', false, $content);
} else {
// Account does not exists!
- OUTPUT_HTML("".ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2."");
+ loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))));
}
}
-//
+// [EOF]
?>