]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/wernis_filter.php
Some more improvements:
[mailer.git] / inc / filter / wernis_filter.php
index 0de661bac38fda585eadca9b0e9879a6f5ea0aef..902473adfba8ebb8672b1c9d415403bff5430cdf 100644 (file)
@@ -45,7 +45,7 @@ function FILTER_WERNIS_USER_REGISTRATION ($filterData) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
 
        // Is generic user registration selected?
-       if ((isPostRequestElementSet('provider')) && (postRequestElement('provider') == 'wernis')) {
+       if ((isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'wernis')) {
                // Run it
                $filterData['status'] = doWernisUserRegistration();
 
@@ -64,7 +64,7 @@ function FILTER_WERNIS_USER_REGISTRATION_DONE () {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
 
        // Is generic user registration selected?
-       if ((isPostRequestElementSet('provider')) && (postRequestElement('provider') == 'wernis')) {
+       if ((isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'wernis')) {
                // Run it
 
                // Interrupt filter chain
@@ -82,7 +82,7 @@ function FILTER_WERNIS_USER_REGISTRATION_FAILED () {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
 
        // Is generic user registration selected?
-       if ((isPostRequestElementSet('provider')) && (postRequestElement('provider') == 'wernis')) {
+       if ((isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'wernis')) {
                // Run it
 
                // Interrupt filter chain
@@ -100,7 +100,7 @@ function FILTER_WERNIS_USER_REGISTRATION_FORM () {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
 
        // Is WDS66 user registration selected?
-       if (((isGetRequestElementSet('provider')) && (getRequestElement('provider') == 'wernis')) || ((!isGetRequestElementSet('provider')) && (getDefaultRegistrationProvider() == 'wernis'))) {
+       if (((isGetRequestElementSet('registration_provider')) && (getRequestElement('registration_provider') == 'wernis')) || ((!isGetRequestElementSet('registration_provider')) && (getDefaultRegistrationProvider() == 'wernis'))) {
                // Run it
                doDisplayWernisUserRegistrationForm();
 
@@ -114,31 +114,42 @@ function FILTER_WERNIS_USER_REGISTRATION_FORM () {
 }
 
 // Filter to run WDS66 API user registation check
-function FILTER_WERNIS_USER_REGISTRATION_CHECK ($filterData) {
+function FILTER_WERNIS_USER_REGISTRATION_CHECK () {
+       // Default is form is not sent
+       $isFormSent = FALSE;
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
 
+       // Is the registration provider set?
+       if ((isFormSent('wernis_register')) && (isPostRequestElementSet('registration_provider')) && (postRequestElement('registration_provider') == 'wernis')) {
+               // Check form
+               $isFormSent = isRegistrationDataComplete();
+
+               // Interrupt filter chain
+               interruptFilterChain();
+       } // END - if
+
        // Return it
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $filterData;
+       return $isFormSent;
 }
 
 // Filter for WDS66 API user login
 // @TODO 0% done
 function FILTER_WERNIS_USER_LOGIN ($filterData) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
 
        // Return filter data
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $filterData;
 }
 
 // Filter for WDS66 API user login check
 // @TODO 0% done
 function FILTER_WERNIS_USER_LOGIN_CHECK ($filterData) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
 
        // Return filter data
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $filterData;
 }