From 52618af8cba1b96c87bfc71e29b5ec3162404823 Mon Sep 17 00:00:00 2001 From: webpwnized Date: Fri, 27 Sep 2024 18:27:16 -0400 Subject: [PATCH] 2.11.18 Preparing for mandatory logins --- src/edit-account-profile.php | 65 +++++++------- src/includes/constants.php | 2 +- src/includes/header.php | 10 +-- src/includes/main-menu.php | 2 +- src/includes/process-commands.php | 18 ++-- src/includes/process-login-attempt.php | 61 +++++++------- src/index.php | 112 +++++++++++-------------- src/login.php | 41 +++++---- version | 2 +- 9 files changed, 153 insertions(+), 160 deletions(-) diff --git a/src/edit-account-profile.php b/src/edit-account-profile.php index 6ca5e947..04999e4a 100755 --- a/src/edit-account-profile.php +++ b/src/edit-account-profile.php @@ -1,26 +1,27 @@ Edit Profile - - + + Username cannot be blank'; }// end if if ($lPassword != $lConfirmedPassword ) { - $lValidationFailed = TRUE; + $lValidationFailed = true; echo '

Passwords do not match

'; }// end if - if (!$lValidationFailed){ + if (!$lValidationFailed){ $lRowsAffected = $SQLQueryHandler->updateUserAccount($lUsername, $lPassword, $lUserSignature); echo '
Profile updated for ' . $lUsernameText . '
'; $LogHandler->writeToLog("Profile updated for: " . $lUsername); @@ -110,7 +111,7 @@ if(isset($_SESSION['uid'])){ $lUserUID = $_SESSION['uid']; }else{ - $lUserUID = NULL; + $lUserUID = null; } // if isset }else{ if(isset($_REQUEST['uid'])){ @@ -119,7 +120,7 @@ if(isset($_COOKIE['uid'])){ $lUserUID = $_COOKIE['uid']; }else{ - $lUserUID = NULL; + $lUserUID = null; } // if isset } // if isset } // $lProtectAgainstIDOR @@ -129,7 +130,7 @@ $lUsername = ""; $lPassword = ""; $lSignature = ""; - $lResultsFound = FALSE; + $lResultsFound = false; if($lUserLoggedIn){ try { @@ -137,9 +138,7 @@ $LogHandler->writeToLog("Got account with UID : " . $lUserUID); if (isset($lQueryResult->num_rows)){ - if ($lQueryResult->num_rows > 0) { - $lResultsFound = TRUE; - }//end if + $lResultsFound = $lQueryResult->num_rows > 0; }//end if if($lResultsFound){ @@ -294,7 +293,7 @@ function onSubmitOfForm(/*HTMLFormElement*/ theForm){ Dont have an account? Please register here - +