// Output success registration
loadTemplate('admin_settings_saved', false, getMessage('REGISTRATION_DONE'));
} else {
- if (postRequestParameter('agree') == '!') {
- registerOutputFailedMessage('HAVE_TO_AGREE');
- } // END - if
-
- if (postRequestParameter('email') == '!') {
- registerOutputFailedMessage('ENTER_EMAIL');
- setPostRequestParameter('email', '');
- } elseif (postRequestParameter('email') == '?') {
- registerOutputFailedMessage('EMAIL_ALREADY_DB');
- setPostRequestParameter('email', '');
- }
-
- if (postRequestParameter('surname') == '!') {
- registerOutputFailedMessage('ENTER_SURNAME');
- setPostRequestParameter('surname', '');
- } // END - if
-
- if (postRequestParameter('family') == '!') {
- registerOutputFailedMessage('ENTER_FAMILY');
- setPostRequestParameter('family', '');
- } // END - if
-
- if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) {
- registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
- } elseif (postRequestParameter('pass1') == '!') {
- registerOutputFailedMessage('ENTER_PASS1');
- } elseif (postRequestParameter('pass2') == '!') {
- registerOutputFailedMessage('ENTER_PASS2');
- }
-
- if ($GLOBALS['registration_short_password'] === true) {
- registerOutputFailedMessage('SHORT_PASS', ': ' . getConfig('pass_len'));
- } // END - if
-
- if ($GLOBALS['registration_ip_timeout'] === true) {
- registerOutputFailedMessage('REMOTE_ADDR_TIMEOUT');
- } // END - if
-
- if ((!empty($GLOBALS['register_selected_cats'])) && ($GLOBALS['register_selected_cats'] < getConfig('least_cats'))) {
- registerOutputFailedMessage('', getMessage('CATS_LEAST'));
+ // Do this only if form is sent
+ if (isFormSent()) {
+ if (postRequestParameter('agree') == '!') {
+ registerOutputFailedMessage('HAVE_TO_AGREE');
+ } // END - if
+
+ if (postRequestParameter('email') == '!') {
+ registerOutputFailedMessage('ENTER_EMAIL');
+ setPostRequestParameter('email', '');
+ } elseif (postRequestParameter('email') == '?') {
+ registerOutputFailedMessage('EMAIL_ALREADY_DB');
+ setPostRequestParameter('email', '');
+ }
+
+ if (postRequestParameter('surname') == '!') {
+ registerOutputFailedMessage('ENTER_SURNAME');
+ setPostRequestParameter('surname', '');
+ } // END - if
+
+ if (postRequestParameter('family') == '!') {
+ registerOutputFailedMessage('ENTER_FAMILY');
+ setPostRequestParameter('family', '');
+ } // END - if
+
+ if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) {
+ registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
+ } elseif (postRequestParameter('pass1') == '!') {
+ registerOutputFailedMessage('ENTER_PASS1');
+ } elseif (postRequestParameter('pass2') == '!') {
+ registerOutputFailedMessage('ENTER_PASS2');
+ }
+
+ if ((isset($GLOBALS['registration_short_password'])) && ($GLOBALS['registration_short_password'] === true)) {
+ registerOutputFailedMessage('SHORT_PASS', ': ' . getConfig('pass_len'));
+ } // END - if
+
+ if ((isset($GLOBALS['registration_ip_timeout'])) && ($GLOBALS['registration_ip_timeout'] === true)) {
+ registerOutputFailedMessage('REMOTE_ADDR_TIMEOUT');
+ } // END - if
+
+ if ((!empty($GLOBALS['register_selected_cats'])) && ($GLOBALS['register_selected_cats'] < getConfig('least_cats'))) {
+ registerOutputFailedMessage('', getMessage('CATS_LEAST'));
+ } // END - if
} // END - if
// Generate birthday selection