} // END - if
// Version of this extension
-setThisExtensionVersion('0.0.8');
+setThisExtensionVersion('0.0.9');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8'));
+setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9'));
switch (getExtensionMode()) {
case 'setup': // Do stuff when installation is running
unregisterFilter(__FILE__, __LINE__, 'user_registration_failed', 'WERNIS_USER_REGISTRATION_FAILED', TRUE, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'user_registration_form', 'WERNIS_USER_REGISTRATION_FORM', TRUE, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'user_login', 'WERNIS_USER_LOGIN', TRUE, isExtensionDryRun());
+ unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_WERNIS', TRUE, isExtensionDryRun());
break;
case 'activate': // Do stuff when admin activates this extension
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Auszahlung-Erweiterung *
* -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Basis-URL für alle Scripte (Referral-Link, auth.php-Umleitung usw. nicht aber API) und Tabelle für API-Aufrufe von auth.php hinzugefügt.");
break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Register a filter
+ registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_WERNIS', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Basis-URL für alle Scripte (Referral-Link, auth.php-Umleitung usw. nicht aber API) und Tabelle für API-Aufrufe von auth.php hinzugefügt.");
+ break;
} // END - switch
// [EOF]
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=<pre>'.print_r($filterData,TRUE).'</pre>';
+ return $filterData;
+}
+
// [EOF]
?>
// Finish user registration with WDS66 API
function doWernisFinishUserRegistration ($challenge, $challengeResponse, $status) {
- // Check status from GET parameters and if the form has been sent
- if (($status == '1') && (isFormSent('wernis_register'))) {
- // The form has been sent and challenge is fine
- die(__FUNCTION__ . ':' . __LINE__ . '<pre>'.print_r(postRequestArray(), TRUE).'</pre>');
- } elseif ($status == '1') {
+ // Is the status 1? (= all fine with API call)
+ if ($status == '1') {
// Get mapped data based on challenge
$return = getWernisMappedDataFromApiByChallenge($challenge, $status);
return $rows;
}
+// Do local user registration with data from WDS66 API
+function doWernisUserRegistration () {
+ // Call generic registration function
+ $status = doGenericUserRegistration();
+
+ // Does this went fine?
+ if ($status === FALSE) {
+ // No, then abort here silently
+ return FALSE;
+ } // END - if
+
+ // Make sure the user id is valid
+ assert(isset($GLOBALS['register_userid']));
+ assert(isValidId($GLOBALS['register_userid']));
+
+ // Generic registration is finished, so add more data:
+}
+
//-----------------------------------------------------------------------------
// Auth status callback functions
//-----------------------------------------------------------------------------