]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-register.php
Some fixes for refid
[mailer.git] / inc / modules / guest / what-register.php
index 873ca6750b3d1bf904efe20b739977b579ddd0a7..c21e1275c5a3e4293061e4093c02a7493934a1d1 100644 (file)
@@ -74,6 +74,9 @@ if ($GLOBALS['refid'] > 0) {
        // Test if the refid is valid
        $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
+
+       // Userid found?
+       //* DEBUG: */ die("refid={$GLOBALS['refid']}/numRows=".SQL_NUMROWS($result)."");
        if (SQL_NUMROWS($result) == 0) {
                // Not found so we set your refid!
                $_POST['refid'] = $_CONFIG['def_refid'];
@@ -88,28 +91,24 @@ if (isset($_POST['ok'])) {
        // First we only check the submitted data then we continue... :)
        //
        // Did he agree to our Terms Of Usage?
-       if ($_POST['agree'] != "Y")
-       {
+       if ($_POST['agree'] != "Y") {
                $_POST['agree'] = "!";
                $FAILED = true;
        }
 
        // Did he enter a valid email address? (we really don't care about
        // that, he has to click on a confirmation link :P )
-       if ((empty($_POST['addy'])) || (!VALIDATE_EMAIL($_POST['addy'])))
-       {
+       if ((empty($_POST['addy'])) || (!VALIDATE_EMAIL($_POST['addy']))) {
                $_POST['addy'] = "!";
                $FAILED = true;
        }
 
        // And what about surname and family's name?
-       if (empty($_POST['surname']))
-       {
+       if (empty($_POST['surname'])) {
                $_POST['surname'] = "!";
                $FAILED = true;
        }
-       if (empty($_POST['family_name']))
-       {
+       if (empty($_POST['family_name'])) {
                $_POST['family_name'] = "!";
                $FAILED = true;
        }