//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay) . ',selected=' . $GLOBALS['registration_selected_cats'] . '/' . getLeastCats());
$isOkay = (($isOkay) && ($GLOBALS['registration_selected_cats'] >= getLeastCats()));
- if ((postRequestElement('email') != '!') && (isCheckDoubleEmailEnabled())) {
- // Does the email address already exists in our database?
- if ((isEmailTaken(postRequestElement('email'))) && (!isAdmin())) {
- setPostRequestElement('email', '?');
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a already used email address.');
- $isOkay = FALSE;
- } // END - if
+ // Check if email is taken, if configured
+ if ((isExtensionInstalledAndNewer('other', '0.3.0')) && (isCheckDoubleEmailEnabled()) && (postRequestElement('email') != '!') && (isEmailTaken(postRequestElement('email'))) && (!isAdmin())) {
+ // Is already used
+ setPostRequestElement('email', '?');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a already used email address.');
+ $isOkay = FALSE;
} // END - if
// Check for IP timeout?
), __FUNCTION__, __LINE__);
// Get his userid
- $filterData['register_insert_id'] = bigintval(SQL_INSERTID());
+ $filterData['register_insert_id'] = SQL_INSERT_ID();
// Did this work?
if (!isValidId($filterData['register_insert_id'])) {
return $GLOBALS[__FUNCTION__];
}
-// Checks whether 'display_refid' is "YES"
+// Checks whether 'display_refid' is "Y"
function isDisplayRefidEnabled () {
// Is the cache entry set?
if (!isset($GLOBALS[__FUNCTION__])) {
return $GLOBALS[__FUNCTION__];
}
+// "Getter" for least_cats
+function getLeastCats () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('least_cats');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// ----------------------------------------------------------------------------
// Template helper functions
// ----------------------------------------------------------------------------