]> git.mxchange.org Git - mailer.git/commitdiff
Fixed handling of empty referal id, see bug #196
authorRoland Häder <roland@mxchange.org>
Tue, 26 Oct 2010 15:31:59 +0000 (15:31 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 26 Oct 2010 15:31:59 +0000 (15:31 +0000)
inc/libs/register_functions.php
inc/modules/guest/what-sponsor_reg.php

index 2eac520fe61802cff03aab275fc57ad9ef7d6aac..3d36d8c374fdcf80aad222b3c6483c007842b960 100644 (file)
@@ -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__);
index 17dd29b14850b779e6fc734f9886c68090a99990..ebe99458fe2219811c70754f0a8c47dd42bb65e3 100644 (file)
@@ -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