(*)'; } // END - if // Add it $filterData['must_fillout_' . strtolower($row['field_name']) . ''] = $value; } // END - while // Free memory sqlFreeResult($result); // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $filterData; } /** * Run a filter for pre user registration - generic code (e.g. create hash, * init global array elements). WARNING: This filter MUST run filter before all * others, make your extension/-update depending on ext-register to avoid * missing global array elements, etc. * * @param $filterData Filter data from previous filter * @return $filterData Unchanged filter data */ function FILTER_PRE_USER_REGISTRATION_GENERIC ($filterData) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Generate hash which will be inserted into confirmation mail $GLOBALS['register_confirm_hash'] = generateHash(sha1( // Get total confirmed, ... getTotalConfirmedUser() . getEncryptSeparator() . // ... unconfirmed ... getTotalUnconfirmedUser() . getEncryptSeparator() . // ... and locked users getTotalLockedUser() . getEncryptSeparator() . postRequestElement('month') . '-' . postRequestElement('day') . '-' . postRequestElement('year') . getEncryptSeparator() . postRequestElement('password1') . getEncryptSeparator() . detectServerName() . getEncryptSeparator() . detectRemoteAddr() . getEncryptSeparator() . detectUserAgent() . '/' . getSiteKey() . '/' . getDateKey() . '/' . getConfig('CACHE_BUSTER') )); // Old way with enterable two-char-code $GLOBALS['register_country_row'] = '`country`'; $GLOBALS['register_country_data'] = substr(postRequestElement('cntry'), 0, 2); // Init "status" as for many users setPostRequestElement('status', 'UNCONFIRMED'); // Add ip for later POST pings setPostRequestElement('remote_addr', detectRemoteAddr()); // Generic initialization is done $filterData['init_done'] = TRUE; // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } // Filter to run generic user registation (default) function FILTER_GENERIC_USER_REGISTRATION ($filterData) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Is generic user registration selected? if ((isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'register')) { // Run it $filterData['status'] = doGenericUserRegistration(); // Interrupt filter chain interruptFilterChain(); } // END - if // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $filterData; } // Filter to run generic user registation check (default) function FILTER_GENERIC_USER_REGISTRATION_CHECK () { // Default is form is not sent $isFormSent = FALSE; //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Is the registration provider set? if ((isFormSent()) && (isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'register')) { // Check form $isFormSent = isRegistrationDataComplete(); // Interrupt filter chain interruptFilterChain(); } // END - if // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); return $isFormSent; } // Filter to run generic things on registration done function FILTER_GENERIC_USER_REGISTRATION_DONE () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Is generic user registration selected? if ((isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'register')) { // Run it displayMessage('{--REGISTRATION_DONE--}'); // Interrupt filter chain interruptFilterChain(); } // END - if // Return NULL return NULL; } // Filter to run generic things on registration failed function FILTER_GENERIC_USER_REGISTRATION_FAILED () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Is generic user registration selected? if ((isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'register')) { // This should not be reached reportBug(__FUNCTION__, __LINE__, 'This filter should not handle it.'); } // END - if // Return NULL return NULL; } // Filter to run generic things on registration form function FILTER_GENERIC_USER_REGISTRATION_FORM () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Is generic user registration selected? if (((isGetRequestElementSet('registration_provider')) && (getRequestElement('registration_provider') == 'register')) || (getDefaultRegistrationProvider() == 'register')) { // Display generic form doDisplayGenericUserRegistrationForm(); // Interrupt filter chain interruptFilterChain(); } // END - if // Return NULL return NULL; } // [EOF] ?>