X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-mydata.php;h=e897ad539b7f607617caeec14701226070d52737;hb=1f98151ba359a81bb54a1c4c8010b24fa4c9dcf0;hp=d742a4fbeeb3c9fa3d2d75d6a085e9797bdecbeb;hpb=41f83d889de7bb9290e5bfb1d9fa1a0bcd16897a;p=mailer.git diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index d742a4fbee..e897ad539b 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Mitglieder koennen hier ihre Profildaten aendern * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -38,20 +43,20 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) { - addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata"); + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata"); return; } // Add description as navigation point ADD_DESCR("member", __FILE__); -define('UID_VALUE', $GLOBALS['userid']); $URL = ""; +define('UID_VALUE', getUserId()); $URL = ""; // Detect what the member wants to do $MODE = "show"; // Show his data -if (!empty($_POST['save'])) $MODE = "save"; // Save entered data -if (isset($_POST['edit'])) $MODE = "edit"; // Edit data -if (!empty($_POST['notify'])) $MODE = "notify"; // Switch off notification +if (REQUEST_ISSET_POST(('save'))) $MODE = "save"; // Save entered data +if (REQUEST_ISSET_POST('edit')) $MODE = "edit"; // Edit data +if (REQUEST_ISSET_POST(('notify'))) $MODE = "notify"; // Switch off notification switch ($MODE) { @@ -194,13 +199,13 @@ case "save": // Save entered data $DATA[3] = MAKE_DATETIME($DATA[3] + getConfig('profile_lock'), "0"); // You cannot change your account LOAD_TEMPLATE("member_mydata_locked"); - } elseif (!VALIDATE_EMAIL($_POST['addy'])) { + } elseif (!VALIDATE_EMAIL(REQUEST_POST('addy'))) { // Invalid email address! LOAD_TEMPLATE("admin_settings_saved", false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED')); } else { // Generate hash - $hash = generateHash($_POST['pass1'], substr($DATA[1], 0, -40)); - if ((($hash == $DATA[1]) || ($_POST['pass1'] == $_POST['pass2'])) && (!empty($_POST['pass1']))) { + $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40)); + if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) { // Only on simple changes normal mode is active = no email or password changed $MODE = "normal"; $AND = ""; @@ -208,10 +213,10 @@ case "save": // Save entered data if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $MODE = "pass"; } // Or did he changed his password? - if ($_POST['addy'] != $DATA[0]) { + if (REQUEST_POST('addy') != $DATA[0]) { // Jupp if ($MODE == "normal") { $MODE = "email"; } else { $MODE .= ";email"; } - $_POST['old_addy'] = $DATA[0]; + REQUEST_SET_POST('old_addy', $DATA[0]); } // Update member's profile @@ -229,18 +234,18 @@ notified='N', last_profile_sent=UNIX_TIMESTAMP() WHERE userid=%s AND password='%s' LIMIT 1", array( - $_POST['gender'], - $_POST['surname'], - $_POST['family_name'], - $_POST['street_nr'], - bigintval($_POST['country_code']), - bigintval($_POST['zip']), - $_POST['city'], - $_POST['addy'], - bigintval($_POST['day']), - bigintval($_POST['month']), - bigintval($_POST['year']), - bigintval($_POST['max_mails']), + REQUEST_POST('gender'), + REQUEST_POST('surname'), + REQUEST_POST('family'), + REQUEST_POST('street_nr'), + bigintval(REQUEST_POST('country_code')), + bigintval(REQUEST_POST('zip')), + REQUEST_POST('city'), + REQUEST_POST('addy'), + bigintval(REQUEST_POST('day')), + bigintval(REQUEST_POST('month')), + bigintval(REQUEST_POST('year')), + bigintval(REQUEST_POST('max_mails')), UID_VALUE, get_session('u_hash') ), __FILE__, __LINE__); @@ -258,18 +263,18 @@ notified='N', last_profile_sent=UNIX_TIMESTAMP() WHERE userid=%s AND password='%s' LIMIT 1", array( - $_POST['gender'], - $_POST['surname'], - $_POST['family_name'], - $_POST['street_nr'], - $_POST['cntry'], - bigintval($_POST['zip']), - $_POST['city'], - $_POST['addy'], - bigintval($_POST['day']), - bigintval($_POST['month']), - bigintval($_POST['year']), - bigintval($_POST['max_mails']), + REQUEST_POST('gender'), + REQUEST_POST('surname'), + REQUEST_POST('family'), + REQUEST_POST('street_nr'), + REQUEST_POST('cntry'), + bigintval(REQUEST_POST('zip')), + REQUEST_POST('city'), + REQUEST_POST('addy'), + bigintval(REQUEST_POST('day')), + bigintval(REQUEST_POST('month')), + bigintval(REQUEST_POST('year')), + bigintval(REQUEST_POST('max_mails')), UID_VALUE, get_session('u_hash') ), __FILE__, __LINE__); @@ -289,7 +294,7 @@ array( 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($GLOBALS['userid']), __FILE__, __LINE__); + array(getUserId()), __FILE__, __LINE__); $URL = "modules.php?module=login&what=welcome&msg=".urlencode(getMessage('PROFILE_UPDATED')); break; }