Fixed bugs in preferences.php

This commit is contained in:
Jonathan Ernst
2004-12-15 00:10:27 +00:00
committed by WineHQ
parent 20bf1c90e3
commit 8656aad61f

View File

@@ -57,30 +57,27 @@ function show_user_fields()
} }
if($HTTP_POST_VARS) if($_REQUEST)
{ {
global $ext_username, $ext_password1, $ext_password2, $ext_realname, $ext_email;
$user = new User(); $user = new User();
while(list($key, $value) = each($HTTP_POST_VARS)) while(list($key, $value) = each($_REQUEST))
{ {
if(!ereg("^pref_(.+)$", $key, $arr)) if(!ereg("^pref_(.+)$", $key, $arr))
continue; continue;
$_SESSION['current']->setpref($arr[1], $value); $_SESSION['current']->setpref($arr[1], $value);
} }
if ($ext_password == $ext_password2) if ($_REQUEST['ext_password'] == $_REQUEST['ext_password2'])
{ {
$passwd = $ext_password; $str_passwd = $_REQUEST['ext_password'];
} }
else if ($ext_password) else if ($_REQUEST['ext_password'])
{ {
addmsg("The Passwords you entered did not match.", "red"); addmsg("The Passwords you entered did not match.", "red");
} }
if ($user->update($_SESSION['current']->userid, $passwd, $ext_realname, $ext_email)) if ($user->update($_SESSION['current']->userid, $str_passwd, $_REQUEST['ext_realname'], $_REQUEST['ext_email']))
{ {
addmsg("Preferences Updated", "green"); addmsg("Preferences Updated", "green");
} }