* */ require_once('../src/base.inc.php'); $error = ''; // Handle form? if ($_SERVER['REQUEST_METHOD'] == 'POST') { $user = $_SESSION['currentUser']; // Change password if (isset($_POST['oldpassword']) and trim($_POST['oldpassword']) != "" and isset($_POST['newpassword']) and trim($_POST['newpassword']) != "" and isset($_POST['newpassword2']) and trim($_POST['newpassword2']) != "") { if ($user->authenticate($_POST['oldpassword'])) { if ($_POST['newpassword'] == $_POST['newpassword2']) { $user->setPassword($_POST['newpassword']); } else { $error .= '

Passwords do not match.

'; } } else { $error .= '

"Old Password" does not match your current password.

'; } } // Set Notify $notify = isset($_POST['notify']) and $_POST['notify'] == '1'; $user->setNotify($notify); $user->save(); } require_once('src/header.inc.php'); echo "

Your Account

"; if ($error != '') { echo "
$error
"; } ?>

To change your password, enter your old and new passwords below.