X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-add_points.php;h=03546b16d751609971c0f1c1f557900dc339d572;hp=5e53d23b013b4aa141f75369692e218105af1606;hb=9f6c30cc0e06098171d773d671292081ecee3d29;hpb=7bfee4bc71e5b7b741f3451b27ba0a09574dfca8 diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 5e53d23b01..03546b16d7 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -84,11 +84,9 @@ if (getRequestElement('userid') == 'all') { } } elseif (isGetRequestElementSet('userid')) { // User id found in URL so we use this give him some credits - $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { + if (fetchUserData(getRequestElement('userid'))) { // Selected user does exist - $content = SQL_FETCHARRAY($result); + $content = getUserDataArray(); if ((isFormSent()) && (isPostRequestElementSet(('points')))) { // Add points and send an email to him... @@ -117,9 +115,6 @@ if (getRequestElement('userid') == 'all') { // User not found! loadTemplate('admin_settings_saved', false, "
".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."
"); } - - // Free result - SQL_FREERESULT($result); } else { // Output selection form with all confirmed user accounts listed addMemberSelectionBox(0, true);