X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2FMCTXWeb%2Fpublic_html%2Fusers%2Foriginal%2Fuser_settings.php;fp=testing%2FMCTXWeb%2Fpublic_html%2Fusers%2Foriginal%2Fuser_settings.php;h=0000000000000000000000000000000000000000;hb=2c8de693e6380c83b68eff4bf647422cde79548d;hp=12603d0b9963303dc92c06d64d059a59d75de3dc;hpb=828cdbf49f52572e93c5c5a48e05277525a4055f;p=matches%2FMCTX3420.git diff --git a/testing/MCTXWeb/public_html/users/original/user_settings.php b/testing/MCTXWeb/public_html/users/original/user_settings.php deleted file mode 100644 index 12603d0..0000000 --- a/testing/MCTXWeb/public_html/users/original/user_settings.php +++ /dev/null @@ -1,152 +0,0 @@ -hash_pw); - - if (trim($password) == ""){ - $errors[] = lang("ACCOUNT_SPECIFY_PASSWORD"); - } - else if($entered_pass != $loggedInUser->hash_pw) - { - //No match - $errors[] = lang("ACCOUNT_PASSWORD_INVALID"); - } - if($email != $loggedInUser->email) - { - if(trim($email) == "") - { - $errors[] = lang("ACCOUNT_SPECIFY_EMAIL"); - } - else if(!isValidEmail($email)) - { - $errors[] = lang("ACCOUNT_INVALID_EMAIL"); - } - else if(emailExists($email)) - { - $errors[] = lang("ACCOUNT_EMAIL_IN_USE", array($email)); - } - - //End data validation - if(count($errors) == 0) - { - $loggedInUser->updateEmail($email); - $successes[] = lang("ACCOUNT_EMAIL_UPDATED"); - } - } - - if ($password_new != "" OR $password_confirm != "") - { - if(trim($password_new) == "") - { - $errors[] = lang("ACCOUNT_SPECIFY_NEW_PASSWORD"); - } - else if(trim($password_confirm) == "") - { - $errors[] = lang("ACCOUNT_SPECIFY_CONFIRM_PASSWORD"); - } - else if(minMaxRange(8,50,$password_new)) - { - $errors[] = lang("ACCOUNT_NEW_PASSWORD_LENGTH",array(8,50)); - } - else if($password_new != $password_confirm) - { - $errors[] = lang("ACCOUNT_PASS_MISMATCH"); - } - - //End data validation - if(count($errors) == 0) - { - //Also prevent updating if someone attempts to update with the same password - $entered_pass_new = generateHash($password_new,$loggedInUser->hash_pw); - - if($entered_pass_new == $loggedInUser->hash_pw) - { - //Don't update, this fool is trying to update with the same password ¬¬ - $errors[] = lang("ACCOUNT_PASSWORD_NOTHING_TO_UPDATE"); - } - else - { - //This function will create the new hash and update the hash_pw property. - $loggedInUser->updatePassword($password_new); - $successes[] = lang("ACCOUNT_PASSWORD_UPDATED"); - } - } - } - if(count($errors) == 0 AND count($successes) == 0){ - $errors[] = lang("NOTHING_TO_UPDATE"); - } -} - -require_once("models/header.php"); -echo " - -
-
-
-

UserCake

-

User Settings

-
"; -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
-
-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-
-
-
-
-
- -"; - -?>