X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Flibs%2Fwernis_functions.php;h=922cb56ff8d05d0c4fb83780f20fa26db794d2cd;hb=25d546f45bdf68f8d843f7357d53eec4a7eacaa9;hp=7a3adca9ba04417b5094f557595e695e0f17e7be;hpb=9b016bdcfb1d242d5873c0a808b06359d3692660;p=mailer.git diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index 7a3adca9ba..922cb56ff8 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -529,11 +529,8 @@ function doDisplayWernisUserRegistrationForm () { // 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__ . '
'.print_r(postRequestArray(), TRUE).'
'); - } 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); @@ -729,6 +726,24 @@ LIMIT %d", 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 //-----------------------------------------------------------------------------