// Add columns for begging rallye, if active
if (!isBegNewMemberNotifyEnabled()) {
- $GLOBALS['register_sql_columns'] .= ', `beg_rallye_enable_notify`, `beg_rallye_disable_notify`';
- $GLOBALS['register_sql_data'] .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()';
+ addExtraRegistrationColumns(', `beg_rallye_enable_notify`, `beg_rallye_disable_notify`');
+ addExtraRegistrationData(', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()');
} // END - if
// Return filter data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
// Okay, add design here
- $GLOBALS['register_sql_columns'] .= ', `curr_theme`';
- $GLOBALS['register_sql_data'] .= ", '{%%pipe,getCurrentTheme%%}'";
+ addExtraRegistrationColumns(', `curr_theme`');
+ addExtraRegistrationData(", '{%%pipe,getCurrentTheme%%}'");
// Return filter data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
// Did he enter a valid email address? (we really don't care about
// that, he has to click on a confirmation link :P )
- if ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email')))) {
+ if ((!isAdmin()) && ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email'))))) {
setPostRequestElement('email', '!');
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter proper email address.');
$isOkay = false;
} // END - if
// Enougth categories selected?
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay='.intval($isOkay).',selected='.$GLOBALS['registration_selected_cats'].'/'.getLeastCats());
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay) . ',selected=' . $GLOBALS['registration_selected_cats'] . '/' . getLeastCats());
$isOkay = (($isOkay) && ($GLOBALS['registration_selected_cats'] >= getLeastCats()));
if ((postRequestElement('email') != '!') && (isCheckDoubleEmailEnabled())) {
} // END - if
// Check for IP timeout?
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay='.intval($isOkay));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay));
if ((!isAdmin()) && (getIpTimeout() > 0)) {
// Check his IP number
$GLOBALS['registration_ip_timeout'] = (countSumTotalData(detectRemoteAddr() , 'user_data', 'userid', 'REMOTE_ADDR', true, ' AND ((UNIX_TIMESTAMP() - `joined`) < {?ip_timeout?} OR (UNIX_TIMESTAMP() - `last_update`) < {?ip_timeout?})') == 1);
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay='.intval($isOkay).',timeout='.intval($GLOBALS['registration_ip_timeout']));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay).',timeout='.intval($GLOBALS['registration_ip_timeout']));
$isOkay = (($isOkay) && (!$GLOBALS['registration_ip_timeout']));
} // END - if
// Return result
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay='.intval($isOkay));
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay) . ' - EXIT!');
return $isOkay;
}
return true;
}
+// Initialize extra registration SQL
+function initExtraRegistrationSql () {
+ $GLOBALS['register_sql_columns'] = '';
+ $GLOBALS['register_sql_data'] = '';
+}
+
+// Add extra column for registration SQL
+function addExtraRegistrationColumns ($column) {
+ // Is it set?
+ if (!isset($GLOBALS['register_sql_columns'])) {
+ // Then initialize it
+ initExtraRegistrationSql();
+ } // END - if
+
+ // Add column
+ $GLOBALS['register_sql_columns'] .= $column;
+}
+
+// Add extra data for registration SQL
+function addExtraRegistrationData ($data) {
+ // Is it set?
+ if (!isset($GLOBALS['register_sql_data'])) {
+ // Then initialize it
+ initExtraRegistrationSql();
+ } // END - if
+
+ // Add column
+ $GLOBALS['register_sql_data'] .= $data;
+}
+
//-----------------------------------------------------------------------------
// Wrapper functions for ext-register
//-----------------------------------------------------------------------------