]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/register_functions.php
Extension ext-coupon continued, a lot improvements applied:
[mailer.git] / inc / libs / register_functions.php
index 4a0ddb570cb2af8e1769a1fd932b86da2213acfc..8eb91a20cb08d6d4e0dbfd02d8243b6b91cbaf69 100644 (file)
@@ -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 = '<span class="notice">(*)</span>';
-               } // 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?