");
- }
-
- // Generate birthday selection
- switch (GET_LANGUAGE())
- {
- case "de": // German date format
- define('BIRTHDAY_SELECTION', ADD_SELECTION("day", $_POST['day']).ADD_SELECTION("month", $_POST['month']).ADD_SELECTION("year", $_POST['year']));
- break;
-
- default: // Default is the US date format... :)
- break;
- }
-
- // Adds a table for the guests with all visible categories
- define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true));
-
- // Adds maximum receiveable mails list... :)
- define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true));
- // Check if nickname extension is active and get state if nickname is selected or userid
- $nick = false;
- if (EXT_IS_ACTIVE("nickname")) $nick = NICKNAME_IS_ACTIVE($GLOBALS['refid']);
-
- // Is the nickname valid?
- if (!$nick) {
- // Nope, disable it
- if (GET_EXT_VERSION("sql_patches") != '') {
- // Use default refid
- $GLOBALS['refid'] = $_CONFIG['def_refid'];
- } else {
- // Set zero
- $GLOBALS['refid'] = 0;
- }
- }
-
- // Shall I display the refid or shall I make it editable?
- if ($_CONFIG['display_refid'] == "Y") {
- // Load template to enter it
- define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid", true, $GLOBALS['refid']));
+// Is the form sent and all went fine?
+//* DEBUG: */ debugOutput('isFormSent=' . intval(isFormSent()) . ',isRegistrationDataComplete=' . intval(isRegistrationDataComplete()) . ',isAdmin=' . intval(isAdmin()));
+if (runFilterChain('check_user_registration') === TRUE) {
+ // Do the registration here
+ if (doUserRegistration()) {
+ // All done
+ runFilterChain('user_registration_done');
} else {
- // Load "hide" form template
- define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
- }
-
- // You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-)
- define('REGISTER_HEADER_CONTENT', LOAD_TEMPLATE("register_header", true));
-
- // Please select at least x categories
- define('LEAST_CATS_VALUE', $_CONFIG['least_cats']);
-
- // Other values
- define('__SURNAME', $_POST['surname']); define('__FAMILY', $_POST['family_name']);
- define('__STREET', $_POST['street_nr']); define('__COUNTRY', $_POST['cntry']);
- define('__ZIP', $_POST['zip']); define('__CITY', $_POST['city']);
- define('__ADDY', $_POST['addy']);
-
- // Shall I add a counrty selection box or the old input box?
- if (EXT_IS_ACTIVE("country"))
- {
- // New variant, good!
- $OUT = "";
- define('__COUNTRY_CONTENT', $OUT);
+ // Something failed
+ runFilterChain('user_registration_failed');
}
- else
- {
- // Old out-dated variant
- define('__COUNTRY_CONTENT', "");
- }
-
- // Set MUST_??? constants
- if ((EXT_IS_ACTIVE("register")) && (GET_EXT_VERSION("register") > "0.0")) REGISTER_FILL_MUST_CONSTANTS();
+} else {
+ // Is a registration provider selected?
+ if (!isGetRequestElementSet('registration_provider')) {
+ // Display selector form
+ loadTemplate('guest_registration_select');
+ } // END - if
// Display registration form
- LOAD_TEMPLATE("guest_register");
+ runFilterChain('user_registration_form');
}
-//
+// [EOF]
?>