X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-mydata.php;h=31b438b6e391d0f89da4247854b2aacba089d1ac;hb=55ef477f5ce5833c6b10321ad5334a6b781552c6;hp=bdbb8cd8a06ec60ca7abe506efef3a3faaf87be9;hpb=cb20090aa0558f1b74f0e9f925f29819e8bb3a45;p=mailer.git diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index bdbb8cd8a0..31b438b6e3 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -53,17 +53,15 @@ if ((!isExtensionActive('mydata')) && (!isAdmin())) { } // END - if // Add userid -$content = array( - 'userid' => getMemberId() -); +$content = array(); // Init variable to prevent notices -$URL = ''; +$url = ''; // Detect what the member wants to do $mode = 'show'; // Show his data if (isPostRequestParameterSet('save')) $mode = 'save'; // Save entered data -if (isPostRequestParameterSet('edit')) $mode = 'edit'; // Edit data +if (isFormSent('edit')) $mode = 'edit'; // Edit data if (isPostRequestParameterSet('notify')) $mode = 'notify'; // Switch off notification switch ($mode) { @@ -72,7 +70,6 @@ switch ($mode) { $content = merge_array($content, getUserDataArray()); // Translate some things - $content['gender'] = translateGender($content['gender']); $content['last_update'] = generateDateTime($content['last_update'], 0); // How far is last change on his profile away from now? @@ -173,11 +170,11 @@ LIMIT 1", if (isExtensionActive('country')) { // Generate selection box - $OUT = "'; $whereStatement = "WHERE `is_active`='Y'"; if (isAdmin()) $whereStatement = ''; $OUT .= generateOptionList('countries', 'id', 'descr', $content['country_code'], 'code', $whereStatement); - $OUT .= ""; + $OUT .= ''; $content['country'] = $OUT; } else { // Ouput default input box @@ -204,7 +201,7 @@ LIMIT 1", loadTemplate('admin_settings_saved', false, $content['update_check']); } elseif ((!isEmailValid(postRequestParameter('email'))) && (!isAdmin())) { // Invalid email address! - loadTemplate('admin_settings_saved', false, getMessage('INVALID_EMAIL_ENTERED')); + loadTemplate('admin_settings_saved', false, '{--INVALID_EMAIL_ENTERED--}'); } else { // Generate hash $hash = generateHash(postRequestParameter('pass1'), substr($content['password'], 0, -40)); @@ -216,7 +213,7 @@ LIMIT 1", // Did the user changed the password? if ($hash != $content['password']) { $AND = ", `password`='" . $hash . "'"; - $mode = 'pass'; + $mode = 'password'; } // END - if // Or did he changed his password? @@ -306,11 +303,11 @@ LIMIT 1", sendModeMails ('mydata', $modes); } else { // Something went wrong - loadTemplate('admin_settings_saved', false, getMessage('MEMBER_UPDATE_FAILED')); + loadTemplate('admin_settings_saved', false, '{--MEMBER_UPDATE_FAILED--}'); } } else { // Entered wrong pass for updating profile - loadTemplate('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG')); + loadTemplate('admin_settings_saved', false, '{--MEBER_UPDATE_PWD_WRONG--}'); } } break; @@ -318,13 +315,13 @@ LIMIT 1", case 'notify': // Switch off notfication SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `notified`='N', `last_update`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1", array(getMemberId()), __FILE__, __LINE__); - $URL = 'modules.php?module=login&what=welcome&code=' . urlencode(getMessage('PROFILE_UPDATED')); + $url = 'modules.php?module=login&what=mydata&code=' . getCode('PROFILE_UPDATED'); break; } // END - switch -if (!empty($URL)) { +if (!empty($url)) { // Load generated URL - redirectToUrl($URL); + redirectToUrl($url); } // END - if // [EOF]