X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-edit_user.php;h=36962b8fa6d4041280b5c01ccb5fcdd9bcbaa302;hp=a241477977f0a8bc24efae224ca7a2434bd43b6a;hb=49acdb7a7adbcf25a8e8683b5581bfcec72b23bd;hpb=596c8ab32594401ca84abfbfe35513ddfff31bec diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index a241477977..36962b8fa6 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -18,7 +18,7 @@ * @TODO Add support for ext-country * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2015 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -49,7 +49,7 @@ addYouAreHereLink('admin', __FILE__); $result_main = FALSE; if (isGetRequestElementSet('userid')) { // Load user entry - $result_main = SQL_QUERY_ESC("SELECT + $result_main = sqlQueryEscaped("SELECT `userid`, `gender`, `surname`, `family`, `street_nr`, `zip`, `city`, `country`, `email`, `birth_day`, `birth_month`, `birth_year`, @@ -64,7 +64,7 @@ LIMIT 1", ), __FILE__, __LINE__); } // END - if -if ((!isGetRequestElementSet('userid')) || (SQL_NUMROWS($result_main) == 1)) { +if ((!isGetRequestElementSet('userid')) || (sqlNumRows($result_main) == 1)) { // User found if (!isGetRequestElementSet('userid')) { // Output selection form with all confirmed user accounts listed @@ -72,18 +72,18 @@ if ((!isGetRequestElementSet('userid')) || (SQL_NUMROWS($result_main) == 1)) { } elseif (isFormSent('edit')) { // Ok, change the account... $updateUser = FALSE; $add = ''; - if ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) { + if ((!isPostRequestElementSet('password1')) && (!isPostRequestElementSet('password2'))) { // Don't change the password $updateUser = TRUE; - } elseif ((postRequestElement('pass1') == postRequestElement('pass2'))) { + } elseif ((postRequestElement('password1') == postRequestElement('password2'))) { // Change the password $updateUser = TRUE; - $add = ",`password`='" . generateHash(postRequestElement('pass1')) . "'"; + $add = ",`password`='" . generateHash(postRequestElement('password1')) . "'"; } if ($updateUser === TRUE) { // We have to add the following things: birthday and max receive mails - SQL_QUERY_ESC("UPDATE + sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `gender`='%s', @@ -119,18 +119,18 @@ LIMIT 1", displayMessage($content); } else { // Load entry - $content = SQL_FETCHARRAY($result_main); + $content = sqlFetchArray($result_main); // Load template loadTemplate('admin_edit_user', FALSE, $content); } } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); + displayErrorMessage('{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } // Free the result -SQL_FREERESULT($result_main); +sqlFreeResult($result_main); // [EOF] ?>