Changeset 1108 for trunk/wp-admin/profile.php
- Timestamp:
- 04/20/2004 10:56:47 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/profile.php
r1100 r1108 14 14 15 15 if (!get_magic_quotes_gpc()) { 16 $ HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);17 $ HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);18 $ HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);16 $_GET = add_magic_quotes($_GET); 17 $_POST = add_magic_quotes($_POST); 18 $_COOKIE = add_magic_quotes($_COOKIE); 19 19 } 20 20 … … 23 23 $wpvar = $wpvarstoreset[$i]; 24 24 if (!isset($$wpvar)) { 25 if (empty($ HTTP_POST_VARS["$wpvar"])) {26 if (empty($ HTTP_GET_VARS["$wpvar"])) {25 if (empty($_POST["$wpvar"])) { 26 if (empty($_GET["$wpvar"])) { 27 27 $$wpvar = ''; 28 28 } else { 29 $$wpvar = $ HTTP_GET_VARS["$wpvar"];29 $$wpvar = $_GET["$wpvar"]; 30 30 } 31 31 } else { 32 $$wpvar = $ HTTP_POST_VARS["$wpvar"];32 $$wpvar = $_POST["$wpvar"]; 33 33 } 34 34 } … … 44 44 45 45 /* checking the nickname has been typed */ 46 if (empty($ HTTP_POST_VARS["newuser_nickname"])) {46 if (empty($_POST["newuser_nickname"])) { 47 47 die ("<strong>ERROR</strong>: please enter your nickname (can be the same as your login)"); 48 48 return false; … … 50 50 51 51 /* if the ICQ UIN has been entered, check to see if it has only numbers */ 52 if (!empty($ HTTP_POST_VARS["newuser_icq"])) {53 if ((ereg("^[0-9]+$",$ HTTP_POST_VARS["newuser_icq"]))==false) {52 if (!empty($_POST["newuser_icq"])) { 53 if ((ereg("^[0-9]+$",$_POST["newuser_icq"]))==false) { 54 54 die ("<strong>ERROR</strong>: your ICQ UIN can only be a number, no letters allowed"); 55 55 return false; … … 58 58 59 59 /* checking e-mail address */ 60 if (empty($ HTTP_POST_VARS["newuser_email"])) {60 if (empty($_POST["newuser_email"])) { 61 61 die ("<strong>ERROR</strong>: please type your e-mail address"); 62 62 return false; 63 } else if (!is_email($ HTTP_POST_VARS["newuser_email"])) {63 } else if (!is_email($_POST["newuser_email"])) { 64 64 die ("<strong>ERROR</strong>: the email address isn't correct"); 65 65 return false; 66 66 } 67 67 68 if ($ HTTP_POST_VARS["pass1"] == "") {69 if ($ HTTP_POST_VARS["pass2"] != "")68 if ($_POST["pass1"] == "") { 69 if ($_POST["pass2"] != "") 70 70 die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice."); 71 71 $updatepassword = ""; 72 72 } else { 73 if ($ HTTP_POST_VARS["pass2"] == "")73 if ($_POST["pass2"] == "") 74 74 die ("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice."); 75 if ($ HTTP_POST_VARS["pass1"] != $HTTP_POST_VARS["pass2"])75 if ($_POST["pass1"] != $_POST["pass2"]) 76 76 die ("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that."); 77 $newuser_pass = $ HTTP_POST_VARS["pass1"];77 $newuser_pass = $_POST["pass1"]; 78 78 $updatepassword = "user_pass=MD5('$newuser_pass'), "; 79 79 setcookie("wordpresspass_".$cookiehash,md5($newuser_pass),time()+31536000); 80 80 } 81 81 82 $newuser_firstname=addslashes(stripslashes($ HTTP_POST_VARS['newuser_firstname']));83 $newuser_lastname=addslashes(stripslashes($ HTTP_POST_VARS['newuser_lastname']));84 $newuser_nickname=addslashes(stripslashes($ HTTP_POST_VARS['newuser_nickname']));85 $newuser_icq=addslashes(stripslashes($ HTTP_POST_VARS['newuser_icq']));86 $newuser_aim=addslashes(stripslashes($ HTTP_POST_VARS['newuser_aim']));87 $newuser_msn=addslashes(stripslashes($ HTTP_POST_VARS['newuser_msn']));88 $newuser_yim=addslashes(stripslashes($ HTTP_POST_VARS['newuser_yim']));89 $newuser_email=addslashes(stripslashes($ HTTP_POST_VARS['newuser_email']));90 $newuser_url=addslashes(stripslashes($ HTTP_POST_VARS['newuser_url']));91 $newuser_idmode=addslashes(stripslashes($ HTTP_POST_VARS['newuser_idmode']));92 $user_description = addslashes(stripslashes($ HTTP_POST_VARS['user_description']));82 $newuser_firstname=addslashes(stripslashes($_POST['newuser_firstname'])); 83 $newuser_lastname=addslashes(stripslashes($_POST['newuser_lastname'])); 84 $newuser_nickname=addslashes(stripslashes($_POST['newuser_nickname'])); 85 $newuser_icq=addslashes(stripslashes($_POST['newuser_icq'])); 86 $newuser_aim=addslashes(stripslashes($_POST['newuser_aim'])); 87 $newuser_msn=addslashes(stripslashes($_POST['newuser_msn'])); 88 $newuser_yim=addslashes(stripslashes($_POST['newuser_yim'])); 89 $newuser_email=addslashes(stripslashes($_POST['newuser_email'])); 90 $newuser_url=addslashes(stripslashes($_POST['newuser_url'])); 91 $newuser_idmode=addslashes(stripslashes($_POST['newuser_idmode'])); 92 $user_description = addslashes(stripslashes($_POST['user_description'])); 93 93 94 94 $query = "UPDATE $tableusers SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description' WHERE ID = $user_ID"; … … 104 104 105 105 $profiledata = get_userdata($user); 106 if ($ HTTP_COOKIE_VARS['wordpressuser_'.$cookiehash] == $profiledata->user_login)106 if ($_COOKIE['wordpressuser_'.$cookiehash] == $profiledata->user_login) 107 107 header ('Location: profile.php'); 108 108
Note: See TracChangeset
for help on using the changeset viewer.