From: Roland Häder Date: Tue, 26 Oct 2010 15:31:59 +0000 (+0000) Subject: Fixed handling of empty referal id, see bug #196 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=794052dcd2f66a3e655c9e0d4865c23f44e79166;p=mailer.git Fixed handling of empty referal id, see bug #196 --- diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 2eac520fe6..3d36d8c374 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -334,7 +334,7 @@ function doRegistration () { generateHash(postRequestParameter('pass1')), bigintval(postRequestParameter('max_mails')), bigintval(postRequestParameter('max_mails')), - bigintval(postRequestParameter('refid')), + makeDatabaseUserId(postRequestParameter('refid')), $hash, detectRemoteAddr(), ), __FUNCTION__, __LINE__); diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 17dd29b148..ebe99458fe 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -293,12 +293,12 @@ ORDER BY $content['form_errors'] = $OUT; // @TODO Maybe a default referal id? - $content['refid'] = 0; + $content['refid'] = 0; // Is the referal id valid? if ((isPostRequestParameterSet('refid')) && (isValidUserId(postRequestParameter('refid')))) { // Transfer referal id - $content['refid'] = bigintval(postRequestParameter('refid')); + $content['refid'] = bigintval(postRequestParameter('refid')); } // END - if } // END - if