]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-del_user.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / admin / what-del_user.php
index 26459be4c7f001ad509aa78d5fc0cc972db11a44..874dc11c6e281ec1dec5de208197141f497ac446 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -45,17 +46,17 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // User exists..
-if ((isFormSent()) || ((isPostRequestParameterSet('del')) && (isPostRequestParameterSet(('reason'))))) {
+if ((isFormSent()) || ((isFormSent('del')) && (isPostRequestParameterSet(('reason'))))) {
        // Is the account there?
        if (fetchUserData(getRequestParameter('userid'))) {
                // Delete user account
                deleteUserAccount(getRequestParameter('userid'), postRequestParameter('reason'));
 
                // Output message
-               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED'));
+               loadTemplate('admin_settings_saved', false, '{--ADMIN_DEL_COMPLETED--}');
        } else {
                // Account does not exists!
-               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))) . '</div>');
        }
 } elseif (isPostRequestParameterSet('no')) {
        // Do not delete him...
@@ -68,19 +69,15 @@ if ((isFormSent()) || ((isPostRequestParameterSet('del')) && (isPostRequestParam
        if (fetchUserData(getRequestParameter('userid'))) {
                // Prepare content
                $content = array(
-                       'email'   => generateEmailLink(getUserData('email'), 'user_data'),
-                       'surname' => getUserData('surname'),
-                       'family'  => getUserData('family'),
-                       'header'  => getMaskedMessage('ADMIN_HEADER_DEL_ACCOUNT', getRequestParameter('userid')),
-                       'text'    => getMaskedMessage('ADMIN_TEXT_DEL_ACCOUNT', getRequestParameter('userid')),
-                       'userid'  => getRequestParameter('userid')
+                       'email'  => generateEmailLink(getUserData('email'), 'user_data'),
+                       'userid' => bigintval(getRequestParameter('userid'))
                );
 
                // Display form
                loadTemplate('admin_del_user', false, $content);
        } else {
                // Account does not exists!
-               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))) . '</div>');
        }
 }