X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-del_user.php;h=12e8a867a049f7ce56d2df1f5ea7ef5a4f53d447;hp=bcb6b72baa0ac3c7fe9f5149997b28d435f65612;hb=9f6c30cc0e06098171d773d671292081ecee3d29;hpb=f97a999e0737c0007ae9c3c26dfef49f75a175ac diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index bcb6b72baa..12e8a867a0 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -17,7 +17,7 @@ * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -37,63 +37,52 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; - require($INC); -} +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); +} // END - if // Display only title when no form was submitted -ADD_DESCR('admin', __FILE__); +addMenuDescription('admin', __FILE__); // User exists.. -if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) { - // Delete users account - $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); - if (SQL_NUMROWS($result_user) == 1) { - // Free memory - SQL_FREERESULT($result_user); - +if ((isFormSent()) || ((isPostRequestElementSet('del')) && (isPostRequestElementSet(('reason'))))) { + // Is the account there? + if (fetchUserData(getRequestElement('userid'))) { // Delete user account - DELETE_USER_ACCOUNT(REQUEST_GET('uid'), REQUEST_POST('reason')); + deleteUserAccount(getRequestElement('userid'), postRequestElement('reason')); // Output message - LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED')); + loadTemplate('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED')); } else { // Account does not exists! - LOAD_TEMPLATE('admin_settings_saved', false, "