X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-sponsor_login.php;h=3bfc7d14f95b14a8bd23b422917e74cbf252bf67;hb=0fe94791af05018868398d3c6c87d2b16f9557a2;hp=df5fd3e162f47ec355a568ed6e3b8194d4806a8b;hpb=e5fe5afb17a5c8106f4c890234dfa39419e70f5d;p=mailer.git diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index df5fd3e162..3bfc7d14f9 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -50,16 +50,16 @@ if ((!isExtensionActive('sponsor'))) { } // END - if $mode = ''; -if (isGetRequestElementSet('mode')) { +if (isGetRequestParameterSet('mode')) { // A "special" mode of the login system was requested - switch (getRequestElement('mode')) { + switch (getRequestParameter('mode')) { case 'activate' : $mode = 'activate'; break; // Activation link requested case 'lost_pass': $mode = 'lost_pass'; break; // Request new password } // END - switch } // END - if // Check if hash for confirmation of email address is given... -if (isGetRequestElementSet('hash')) { +if (isGetRequestParameterSet('hash')) { // Lookup sponsor $result = SQL_QUERY_ESC("SELECT `id`, `status`, `gender`, `surname`, `family`, @@ -70,7 +70,7 @@ FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `hash='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') -LIMIT 1", array(getRequestElement('hash')), __FILE__, __LINE__); +LIMIT 1", array(getRequestParameter('hash')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Sponsor found, load his data... $SPONSOR = SQL_FETCHARRAY($result); @@ -85,7 +85,7 @@ LIMIT 1", array(getRequestElement('hash')), __FILE__, __LINE__); // Set account to pending SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='PENDING' WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1", - array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__); + array(bigintval($SPONSOR['id']), getRequestParameter('hash')), __FILE__, __LINE__); // Check on success if (SQL_AFFECTEDROWS() == 1) { @@ -106,7 +106,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1", // Changed email adress need to be confirmed SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='CONFIRMED' WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", - array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__); + array(bigintval($SPONSOR['id']), getRequestParameter('hash')), __FILE__, __LINE__); // Check on success if (SQL_AFFECTEDROWS() == 1) { @@ -122,7 +122,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", } } else { // No sponsor found - loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestElement('hash'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestParameter('hash'))); } // Free memory @@ -131,7 +131,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", // Send activation link again if (isFormSent()) { // Check submitted data - if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); + if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok'); } if (isFormSent()) { @@ -139,7 +139,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", $result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, gender, surname, family, sponsor_created FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", - array(postRequestElement('email')), __FILE__, __LINE__); + array(postRequestParameter('email')), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -158,7 +158,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", // Confirmed email address $message_sponsor = loadEmailTemplate('sponsor_email', $SPONSOR); } - sendEmail(postRequestElement('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor); + sendEmail(postRequestParameter('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor); // Output message loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_SENT')); @@ -177,7 +177,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", // Send new password if (isFormSent()) { // Check submitted data - if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); + if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok'); } // END - if if (isFormSent()) { @@ -185,7 +185,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", $result = SQL_QUERY_ESC("SELECT `id`, `hash`, `remote_addr`, `gender`, `surname`, `family`, `sponsor_created` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `email`='%s' AND `id`='%s' AND `status`='CONFIRMED' LIMIT 1", - array(postRequestElement('email'), bigintval(postRequestElement('id'))), __FILE__, __LINE__); + array(postRequestParameter('email'), bigintval(postRequestParameter('id'))), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -201,7 +201,7 @@ WHERE `email`='%s' AND `id`='%s' AND `status`='CONFIRMED' LIMIT 1", // Prepare email and send it to the sponsor $message_sponsor = loadEmailTemplate('sponsor_lost', $DATA); - sendEmail(postRequestElement('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_sponsor); + sendEmail(postRequestParameter('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_sponsor); // Update password SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `password`='%s' @@ -225,15 +225,15 @@ WHERE `id`='%s' LIMIT 1", // Check status and login data ... $result = SQL_QUERY_ESC("SELECT status FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' AND password='%s' LIMIT 1", - array(bigintval(postRequestElement('sponsorid')), md5(postRequestElement('pass'))), __FILE__, __LINE__); + array(bigintval(postRequestParameter('sponsorid')), md5(postRequestParameter('pass'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Okay, first login data check passed, now has he/she an approved (CONFIRMED) account? list($status) = SQL_FETCHROW($result); if ($status == 'CONFIRMED') { // Is confirmed so both is fine and we can continue with login procedure - $login = ((setSession('sponsorid' , bigintval(postRequestElement('sponsorid')))) && - (setSession('sponsorpass', md5(postRequestElement('pass')) )) + $login = ((setSession('sponsorid' , bigintval(postRequestParameter('sponsorid')))) && + (setSession('sponsorpass', md5(postRequestParameter('pass')) )) ); if ($login === true) {