]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-register.php
Fix of the fix... ;)
[mailer.git] / inc / modules / guest / what-register.php
index e23712f41d5bef1cf4e0d3e822afc8eef44fac87..c21e1275c5a3e4293061e4093c02a7493934a1d1 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
 
 global $_CONFIG, $DATA;
 
@@ -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;
        }