Anonymity/privacy extension 'removeip' added
[mailer.git] / inc / modules / guest / what-register.php
index 860cd24d90ec630248173febf3c570942a92aae7..afaef39628f76bbb25130e08e37fbc74051f4a3c 100644 (file)
@@ -161,7 +161,7 @@ if (isset($_POST['ok'])) {
 
        // Check his IP number
        $result = SQL_QUERY_ESC("SELECT joined, last_update FROM "._MYSQL_PREFIX."_user_data WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1",
-        array(getenv('REMOTE_ADDR'), $_CONFIG['ip_timeout'], $_CONFIG['ip_timeout']), __FILE__, __LINE__);
+        array(GET_REMOTE_ADDR(), $_CONFIG['ip_timeout'], $_CONFIG['ip_timeout']), __FILE__, __LINE__);
        if ((SQL_NUMROWS($result) == 1) && (!IS_ADMIN()))
        {
                // Same IP in timeout range and different email address entered... Eat this, faker! ;-)
@@ -184,7 +184,7 @@ if ((isset($_POST['ok'])) && (!$FAILED))
        $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
 
        // Hash = MM-DD-YYYY:IP:USER_AGENT:TIMEMARK
-       $hash = generateHash(sha1($totalUsers.":".$_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".getenv('REMOTE_ADDR').":".getenv('HTTP_USER_AGENT')."-".time())."/".RAND_NUMBER);
+       $hash = generateHash(sha1($totalUsers.":".$_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".GET_REMOTE_ADDR().":".GET_USER_AGENT()."-".time())."/".RAND_NUMBER);
 
        // Add design when extension sql_patches is v0.2.7 or greater
        $ADD1 = ""; $ADD2 = "";
@@ -249,7 +249,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
                bigintval($_POST['max_mails']),
                bigintval($_POST['refid']),
                $hash,
-               getenv('REMOTE_ADDR'),
+               GET_REMOTE_ADDR(),
        ), __FILE__, __LINE__);
 
        // Get his userid