// Is the array filled?
if ((count($return['mapped_data']) > 0) && (empty($return['message']))) {
+ // Set must-fillout fields
+ $return['mapped_data'] = runFilterChain('register_must_fillout', $return['mapped_data']);
+
+ // Add missing elements
+ $return['mapped_data']['gender'] = NULL;
+ $return['mapped_data']['birthday_selection'] = generateDayMonthYearSelectionBox($return['mapped_data']['birth_day'], $return['mapped_data']['birth_month'], $return['mapped_data']['birth_year']);
+
// Display form
loadTemplate('guest_wernis_registration_form', FALSE, $return['mapped_data']);
+
+ // All fine
return TRUE;
} else {
- // Something bad happened
+ // Something unexpected happened (e.g. no API requests left)
displayMessage($return['message']);
return FALSE;
}
} // END - if
// Now call "get.php"
- $response = executeWernisApiGet($rows[0], 'data', 'anrede|vorname|name|strasse|plz|ort|birth_day|birth_month|birth_year|email|werber');
+ $response = executeWernisApiGet($rows[0], 'data', 'vorname|name|strasse|plz|ort|birth_day|birth_month|birth_year|email|werber');
// Was the status okay?
if (isHttpResponseStatusOkay($response)) {
/*
* Do some checks on the decoded string, it should be a
- * serialized array with 11 entries (see above
+ * serialized array with 10 entries (see above
* executeWernisApiGet() call).
*/
- assert(substr($decodedData, 0, 6) == 'a:11:{');
+ assert(substr($decodedData, 0, 6) == 'a:10:{');
assert(substr($decodedData, -1, 1) == '}');
// The array seems to be fine, unserialize it
// All mappings WDS66->mailer
$mappings = array(
- 'anrede' => 'gender',
'vorname' => 'surname',
'name' => 'family',
'strasse' => 'street_nr',