X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-del_user.php;h=2f84947b9ee19eb4c22e7264bfeec3460a213cac;hb=8d0ed5ed9a9ca0e07b9582f2311b44bdcc5a95ea;hp=ed7682ebadd17a2a5d91a2cfaa041a45438d32e1;hpb=70b993e3f0cd47e3350fe86b75219e510dc56d0b;p=mailer.git
diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php
index ed7682ebad..2f84947b9e 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
+ displayMessage('{--ADMIN_DELETE_COMPLETED--}');
} else {
// Account does not exists!
- LOAD_TEMPLATE("admin_settings_saved", false, "
".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."
");
+ loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))));
}
-} elseif (REQUEST_ISSET_POST(('no'))) {
+} elseif (isPostRequestParameterSet('no')) {
// Do not delete him...
- LOAD_URL("modules.php?module=admin&what=list_user&uid=".REQUEST_GET('uid'));
-} elseif (!REQUEST_ISSET_GET(('uid'))) {
+ 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(REQUEST_GET('uid'))), __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' , REQUEST_GET('uid'));
+ 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!
- LOAD_TEMPLATE("admin_settings_saved", false, "".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."
");
+ loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))));
}
}
-//
+// [EOF]
?>