Possible further fix for #128
[mailer.git] / inc / modules / guest / what-register.php
index 5b37fad630685705c04cf23ef8fdbac35bc7bbbc..44790f134a8571fed7830ce8722a04230a5f6ee1 100644 (file)
@@ -62,8 +62,8 @@ if (!REQUEST_ISSET_POST(('agree')))        REQUEST_SET_POST('agree'       , '');
 if (!REQUEST_ISSET_POST(('addy')))         REQUEST_SET_POST('addy'        , '');
 if (!REQUEST_ISSET_POST(('surname')))      REQUEST_SET_POST('surname'     , '');
 if (!REQUEST_ISSET_POST(('family')))       REQUEST_SET_POST('family'      , '');
-if (!REQUEST_ISSET_POST(('pass1')))        REQUEST_SET_POST('pass1'       , '');
-if (!REQUEST_ISSET_POST(('pass2')))        REQUEST_SET_POST('pass2'       , '');
+if (!REQUEST_ISSET_POST('pass1'))        REQUEST_SET_POST('pass1'       , '');
+if (!REQUEST_ISSET_POST('pass2'))        REQUEST_SET_POST('pass2'       , '');
 if (!REQUEST_ISSET_POST(('day')))          REQUEST_SET_POST('day'         , '');
 if (!REQUEST_ISSET_POST(('month')))        REQUEST_SET_POST('month'       , '');
 if (!REQUEST_ISSET_POST(('year')))         REQUEST_SET_POST('year'        , '');
@@ -119,17 +119,23 @@ if (isFormSent()) {
                $isFailed = true;
        } // END - if
 
+       // Get temporary array for modification
+       $postArray = REQUEST_POST_ARRAY();
+
        // Check for required fields
-       if ($isFailed === false) $isFailed = REGISTER_CHECK_REQUIRED_FIELDS(REQUEST_POST_ARRAY());
+       if ($isFailed === false) $isFailed = ifRequiredRegisterFieldsAreSet($postArray);
+
+       // Set it back in request
+       REQUEST_SET_POST_ARRAY($postArray);
 
        // Did he enter his password twice?
-       if (((!REQUEST_ISSET_POST(('pass1'))) || (!REQUEST_ISSET_POST(('pass2')))) || ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST(('pass1'))) && (REQUEST_ISSET_POST(('pass2'))))) {
-               if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST(('pass1'))) && (REQUEST_ISSET_POST(('pass2')))) {
+       if (((!REQUEST_ISSET_POST('pass1')) || (!REQUEST_ISSET_POST('pass2'))) || ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2')))) {
+               if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2'))) {
                        REQUEST_SET_POST('pass1', '!');
                        REQUEST_SET_POST('pass2', '!');
                } else {
-                       if (!REQUEST_ISSET_POST(('pass1'))) { REQUEST_SET_POST('pass1', '!'); } else { REQUEST_SET_POST('pass1', ''); }
-                       if (!REQUEST_ISSET_POST(('pass2'))) { REQUEST_SET_POST('pass2', '!'); } else { REQUEST_SET_POST('pass2', ''); }
+                       if (!REQUEST_ISSET_POST('pass1')) { REQUEST_SET_POST('pass1', '!'); } else { REQUEST_SET_POST('pass1', ''); }
+                       if (!REQUEST_ISSET_POST('pass2')) { REQUEST_SET_POST('pass2', '!'); } else { REQUEST_SET_POST('pass2', ''); }
                }
                $isFailed = true;
        } // END - if