diff --git a/account.php b/account.php
index 04454f4..ff8ebc6 100644
--- a/account.php
+++ b/account.php
@@ -83,29 +83,29 @@ function cmd_do_new()
{
$aClean = array(); //array of filtered user input
- $aClean['ext_email'] = makeSafe($_POST['ext_email']);
- $aClean['ext_password'] = makeSafe($_POST['ext_password']);
- $aClean['ext_password2'] = makeSafe($_POST['ext_password2']);
- $aClean['CVSrelease'] = makeSafe($_POST['CVSrelease']);
- $aClean['ext_realname']= makeSafe($_POST['ext_realname']);
+ $aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
+ $aClean['sUserPassword'] = makeSafe($_POST['sUserPassword']);
+ $aClean['sUserPassword2'] = makeSafe($_POST['sUserPassword2']);
+ $aClean['sWineRelease'] = makeSafe($_POST['sWineRelease']);
+ $aClean['sUserRealname']= makeSafe($_POST['sUserRealname']);
- if(!ereg("^.+@.+\\..+$", $aClean['ext_email']))
+ if(!ereg("^.+@.+\\..+$", $aClean['sUserEmail']))
{
- $aClean['ext_email'] = "";
+ $aClean['sUserEmail'] = "";
retry("new", "Invalid email address");
return;
}
- if(strlen($aClean['ext_password']) < 5)
+ if(strlen($aClean['sUserPassword']) < 5)
{
retry("new", "Password must be at least 5 characters");
return;
}
- if($aClean['ext_password'] != $aClean['ext_password2'])
+ if($aClean['sUserPassword'] != $aClean['sUserPassword2'])
{
retry("new", "Passwords don't match");
return;
}
- if(empty($aClean['ext_realname']))
+ if(empty($aClean['sUserRealname']))
{
retry("new", "You don't have a Real name?");
return;
@@ -113,14 +113,15 @@ function cmd_do_new()
$oUser = new User();
- $iResult = $oUser->create($aClean['ext_email'], $aClean['ext_password'], $aClean['ext_realname'], $aClean['CVSrelease'] );
+ $iResult = $oUser->create($aClean['sUserEmail'], $aClean['sUserPassword'],
+ $aClean['sUserRealname'], $aClean['sWineRelease'] );
if($iResult == SUCCESS)
{
/* if we can log the user in, log them in automatically */
- $oUser->login($aClean['ext_email'], $aClean['ext_password']);
+ $oUser->login($aClean['sUserEmail'], $aClean['sUserPassword']);
- addmsg("Account created! (".$aClean['ext_email'].")", "green");
+ addmsg("Account created! (".$aClean['sUserEmail'].")", "green");
redirect(apidb_fullurl());
}
else if($iResult == USER_CREATE_EXISTS)
@@ -146,11 +147,11 @@ function cmd_send_passwd()
{
$aClean = array(); //array of filtered user input
- $aClean['ext_email'] = makeSafe($_POST['ext_email']);
+ $aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
/* if the user didn't enter any email address we should */
/* ask them to */
- if($aClean['ext_email'] == "")
+ if($aClean['sUserEmail'] == "")
{
addmsg("Please enter your email address in the 'E-mail' field and re-request a new password",
"green");
@@ -160,7 +161,7 @@ function cmd_send_passwd()
$shNote = '(Note: accounts for appdb.winehq.org and bugs.winehq.org '
.'are separated, so You might need to create second account for appdb.)';
- $iUserId = User::exists($aClean['ext_email']);
+ $iUserId = User::exists($aClean['sUserEmail']);
$sPasswd = User::generate_passwd();
$oUser = new User($iUserId);
if ($iUserId)
@@ -190,7 +191,7 @@ function cmd_send_passwd()
}
else
{
- addmsg("Sorry, that user (".$aClean['ext_email'].") does not exist.
"
+ addmsg("Sorry, that user (".$aClean['sUserEmail'].") does not exist.
"
.$shNote, "red");
}
@@ -204,11 +205,11 @@ function cmd_do_login()
{
$aClean = array(); //array of filtered user input
- $aClean['ext_email'] = makeSafe($_POST['ext_email']);
- $aClean['ext_password'] = makeSafe($_POST['ext_password']);
+ $aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
+ $aClean['sUserPassword'] = makeSafe($_POST['sUserPassword']);
$oUser = new User();
- $iResult = $oUser->login($aClean['ext_email'], $aClean['ext_password']);
+ $iResult = $oUser->login($aClean['sUserEmail'], $aClean['sUserPassword']);
if($iResult == SUCCESS)
{
diff --git a/include/form_edit.php b/include/form_edit.php
index 0b6afb9..c11107d 100644
--- a/include/form_edit.php
+++ b/include/form_edit.php
@@ -12,19 +12,19 @@ $aClean['userId'] = makeSafe($_REQUEST['userId']);
| '> | +'> | |
| Password | -+ | |
| Password (again) | -+ | |
| Real Name | -'> | +'> | Wine version | "; - make_bugzilla_version_list("CVSrelease", $CVSrelease); + make_bugzilla_version_list("sWineRelease", $aClean['sWineRelease']); echo " | "; ?> diff --git a/preferences.php b/preferences.php index b9d9f3c..ee5d6e1 100644 --- a/preferences.php +++ b/preferences.php @@ -14,12 +14,12 @@ $aClean = array(); //array of filtered user input $aClean['userId'] = makeSafe($_REQUEST['userId']); $aClean['iLimit'] = makeSafe($_REQUEST['iLimit']); $aClean['sOrderBy'] = makeSafe($_REQUEST['sOrderBy']); -$aClean['ext_password'] = makeSafe($_REQUEST['ext_password']); -$aClean['ext_password2'] = makeSafe($_REQUEST['ext_password2']); -$aClean['ext_email'] = makeSafe($_REQUEST['ext_email']); -$aClean['ext_realname'] = makeSafe($_REQUEST['ext_realname']); -$aClean['CVSrelease'] = makeSafe($_REQUEST['CVSrelease']); -$aClean['ext_hasadmin'] = makeSafe($_POST['ext_hasadmin']); +$aClean['sUserPassword'] = makeSafe($_REQUEST['sUserPassword']); +$aClean['sUserPassword2'] = makeSafe($_REQUEST['sUserPassword2']); +$aClean['sUserEmail'] = makeSafe($_REQUEST['sUserEmail']); +$aClean['sUserRealname'] = makeSafe($_REQUEST['sUserRealname']); +$aClean['sWineRelease'] = makeSafe($_REQUEST['sWineRelease']); +$aClean['sHasAdmin'] = makeSafe($_POST['sHasAdmin']); /* filter all of the preferences */ while(list($key, $value) = each($_REQUEST)) @@ -85,18 +85,18 @@ function show_user_fields() { global $oUser; - $ext_realname = $oUser->sRealname; - $ext_email = $oUser->sEmail; - $CVSrelease = $oUser->sWineRelease; + $sUserRealname = $oUser->sRealname; + $sUserEmail = $oUser->sEmail; + $sWineRelease = $oUser->sWineRelease; if($oUser->hasPriv("admin")) - $ext_hasadmin = 'checked="true"'; + $sHasAdmin = 'checked="true"'; else - $ext_hasadmin = ""; + $sHasAdmin = ""; include(BASE."include/form_edit.php"); echo "
| Wine version | "; - make_bugzilla_version_list("CVSrelease", $CVSrelease); + make_bugzilla_version_list("sWineRelease", $sWineRelease); echo " |