X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-nickname.php;h=7a9e7b511447e4500b7b0f879c56f1101be9f766;hb=37926c3fc93e4e2e000226375893a2f7f6bf3180;hp=33e0908c40a82c359225e9deec008d1fb994a117;hpb=06d179ae45f3f049003e6fe213249842b2a630fe;p=mailer.git diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 33e0908c40..7a9e7b5114 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -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 * @@ -55,12 +56,12 @@ $isValid = false; if (isFormSent()) { // Nickname was submitted so let's check if it is not already in use - if (isPostRequestElementSet('nickname')) { + if (isPostRequestParameterSet('nickname')) { // Check if nickname is valid $PATTERN = '[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}'; - if (ereg($PATTERN, postRequestElement('nickname'), $array)) { + if (isInString($PATTERN, postRequestParameter('nickname'), $array)) { // Entered nickname is valid? - $isValid = ($array[0] == postRequestElement('nickname')); + $isValid = ($array[0] == postRequestParameter('nickname')); } // END - if } // END - if } // END - if @@ -68,11 +69,11 @@ if (isFormSent()) { if ($isValid === true) { // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !) $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1", - array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); + if (SQL_HASZERONUMS($result)) { // Nickname not in use, so set it now SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1", - array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); + array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); $content = getMessage('NICKNAME_SAVED'); } else { // Free result @@ -86,7 +87,7 @@ if ($isValid === true) { loadTemplate('admin_settings_saved', false, $content); } else { // Do we have already submit the form? - if (isPostRequestElementSet('nickname')) { + if (isPostRequestParameterSet('nickname')) { loadTemplate('admin_settings_saved', false, '
{--NICKNAME_IS_INVALID--}
'); } // END - if