X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffilter%2Fwernis_filter.php;h=24fd6db7f26a6121f44962d93e5f023cdd69d187;hb=c4be539d249046d6d64d2181c3a1e898fe9a64f5;hp=53b5a43b8c66aa5ebaf568ef84c5361fb05629db;hpb=ba59d6cfbe27195f59bbe2b7cab3d01bf9ceb566;p=mailer.git diff --git a/inc/filter/wernis_filter.php b/inc/filter/wernis_filter.php index 53b5a43b8c..24fd6db7f2 100644 --- a/inc/filter/wernis_filter.php +++ b/inc/filter/wernis_filter.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -99,9 +99,10 @@ function FILTER_WERNIS_USER_REGISTRATION_FAILED () { function FILTER_WERNIS_USER_REGISTRATION_FORM () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); - // Is generic user registration selected? - if (((isGetRequestElementSet('registration_provider')) && (gettRequestElement('registration_provider') == 'wernis')) || (getDefaultRegistrationProvider() == 'wernis')) { + // Is WDS66 user registration selected? + if (((isGetRequestElementSet('registration_provider')) && (getRequestElement('registration_provider') == 'wernis')) || ((!isGetRequestElementSet('registration_provider')) && (getDefaultRegistrationProvider() == 'wernis'))) { // Run it + doDisplayWernisUserRegistrationForm(); // Interrupt filter chain interruptFilterChain(); @@ -113,31 +114,57 @@ 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!'); + return $filterData; +} + +/** + * Run a filter for pre user registration + * + * @param $filterData Filter data from previous filter + * @return $filterData Unchanged filter data + */ +function FILTER_PRE_USER_REGISTRATION_WERNIS ($filterData) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); + + // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); + /* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; }