X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fregister_functions.php;h=8eb91a20cb08d6d4e0dbfd02d8243b6b91cbaf69;hb=64d1c97381cc29f3fe639d18e8884098df580f2b;hp=4a0ddb570cb2af8e1769a1fd932b86da2213acfc;hpb=c763367ce3859b46a4ef1d4dfbcbbf2e8b644ee3;p=mailer.git diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 4a0ddb570c..8eb91a20cb 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -109,7 +109,7 @@ function registerGenerateCategoryTable ($mode, $return=false) { SQL_FREERESULT($result); } else { // No categories setted up so far... - $OUT .= loadTemplate('admin_settings_saved', true, '{--NO_CATEGORIES_VISIBLE--}'); + $OUT .= displayMessage('{--NO_CATEGORIES_VISIBLE--}', true); } if ($return === true) { @@ -130,31 +130,6 @@ function registerOutputFailedMessage ($messageId, $extra='') { } } -// Run a filter for must-fillout fields -function FILTER_REGISTER_MUST_FILLOUT ($content) { - // Get all fields for output - $result = SQL_QUERY('SELECT `field_name`, `field_required` FROM `{?_MYSQL_PREFIX?}_must_register` ORDER BY `id` ASC', - __FUNCTION__, __LINE__); - - // Walk through all entries - while ($row = SQL_FETCHARRAY($result)) { - // Must the user fill out this element? - $value = ''; - if ($row['field_required'] == 'Y') { - $value = '(*)'; - } // END - if - - // Add it - $content['must_fillout_' . strtolower($row['field_name']) . ''] = $value; - } // END - while - - // Free memory - SQL_FREERESULT($result); - - // Return it - return $content; -} - // Checks wether the registration data is complete function isRegistrationDataComplete () { // Init elements @@ -262,7 +237,7 @@ function isRegistrationDataComplete () { if ((postRequestParameter('email') != '!') && (isCheckDoubleEmailEnabled())) { // Does the email address already exists in our database? - if ((!isAdmin()) && (isEmailTaken(postRequestParameter('email')))) { + if ((isEmailTaken(postRequestParameter('email'))) && (!isAdmin())) { setPostRequestParameter('email', '?'); $isOkay = false; } // END - if @@ -375,7 +350,7 @@ function doRegistration () { // Did this work? if ($userid == '0') { // Something bad happened! - loadTemplate('admin_settings_saved', false, '{--USER_NOT_REGISTERED--}'); + displayMessage('{--USER_NOT_REGISTERED--}'); // Stop here return; @@ -507,30 +482,6 @@ function getIpTimeout () { return $GLOBALS[__FUNCTION__]; } -// Getter for 'check_double_email' -function getCheckDoubleEmail () { - // Is the cache entry set? - if (!isset($GLOBALS[__FUNCTION__])) { - // No, so determine it - $GLOBALS[__FUNCTION__] = getConfig('check_double_email'); - } // END - if - - // Return cached entry - return $GLOBALS[__FUNCTION__]; -} - -// Checks wether 'check_double_email' is "YES" -function isCheckDoubleEmailEnabled () { - // Is the cache entry set? - if (!isset($GLOBALS[__FUNCTION__])) { - // No, so determine it - $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y'); - } // END - if - - // Return cached entry - return $GLOBALS[__FUNCTION__]; -} - // Getter for 'register_default' function getRegisterDefault () { // Is the cache entry set?