'Username', 'password' => 'Password', 'password_confirm' => 'Re-enter Password', 'secret_id' => 'Pick a reminder question', 'secret_answer' => 'Your answer' ); require_once('/afs/ece.cmu.edu/web/ece/htdocs/tools/msc-game/encryption-keys.php'); $oLogin = new Login_Cyberacademy(); $bIsLoggedIn = $oLogin->isLoggedIn(); // Get the secret questions $sSql = 'SELECT secret_id, secret_name FROM gm_lkp_user_secret'; $aSecretQuestions = DBConn::getArray($sSql, 'secret_id', 'secret_name'); $oErr = new ErrorCollector(); if (!empty($_POST['submit'])) { // Scrub input foreach ($_POST as $sKey => $sVal) { $_POST[$sKey] = getPost($sKey); } // Validate input // Check for missing inputs foreach ($aRequiredFields as $sRequiredField => $sRequiredFieldDescription) { if (empty($_POST[$sRequiredField])) { $oErr->add('"' . $sRequiredFieldDescription . '" must be provided.', true); } } // Verify the incoming information $sSql = 'SELECT user_id FROM gm_user WHERE user_username = ? AND secret_id = ! AND secret_answer = AES_ENCRYPT(?, ?)'; $iUserId = DBConn::getValue($sSql, 'user_id', array($_POST['username'], $_POST['secret_id'], $_POST['secret_answer'], AES_ENCRYPTION_KEY_SECRET)); if (empty($iUserId)) { $oErr->add('We are unable to retrieve your account information. Please be sure that you have provided the correct username and secret question and answer.', true); } else if ($_POST['password'] != $_POST['password_confirm']) { $oErr->add('The passwords provided do not match.', true); } else if (!empty($_POST['password']) && strlen($_POST['password']) < $iMinPasswordLength) { $oErr->add('The password provided was too short. Please use a password with at least ' . $iMinPasswordLength . ' characters.'); } else if (strpos($_POST['password'], ' ') !== false) { $oErr->add('Your password can not contain any spaces.', true); } if (!$oErr->hasError()) { // Update the password $sSql = 'UPDATE gm_user SET user_password = AES_ENCRYPT(?, ?) WHERE user_id = !'; if (DBConn::executeNonQuery($sSql, array($_POST['password'], AES_ENCRYPTION_KEY_PASSWORD, $iUserId))) { doRedirect('passwordComplete.html'); } else { $oErr->add('We were unable to update your information. Please try again, or email us for help.', true); } } } $sErr = $oErr->toString(); $oTpl = new Savant2_Common(); ?> Reset Password
Go To the Academy Web site

Quick Help:.

Want to know more about the Game?
Click here for more about The MySecureCyberspace Game.

Want to see what the Game is like?
Click here to view a demo video of the Game.

Don't have Username yet?
Click here to register a username.

Want to download the Game?
Click here to download The MySecureCyberspace Game.

Want to know more about our Policies?
Click here for more about our Privacy Policy and Terms of Use.

Reset Password

Forget your password? Don't worry, you can reset it. Enter your username and reminder question information below.

Please correct the following:

_($sErr)?>

plugin('input', 'text', 'username', str_alt($oLogin->getLoginUsername(), $_POST['username']), array('size' => 30, 'maxlength' => 20, 'class' => 'formField', 'id' => 'username')); ?> plugin('label', 'username', 'Username'); ?>

plugin('label', 'secret_id', 'What is your
reminder question?'); ?>

plugin('input', 'text', 'secret_answer', $_POST['secret_answer'], array('size' => 30, 'maxlength' => 20, 'class' => 'formField', 'id' => 'secret_answer')); ?> plugin('label', 'secret_answer', 'Your answer'); ?>

If you cannot remember your username or the answer to your reminder question, you will have to create a new account.

plugin('input', 'password', 'password', null, array('size' => 30, 'maxlength' => $iMaxPasswordLength, 'class' => 'formField', 'id' => 'password')); ?> plugin('label', 'password', 'New Password'); ?>
- characters,
no spaces

plugin('input', 'password', 'password_confirm', null, array('size' => 30, 'maxlength' => $iMaxPasswordLength, 'class' => 'formField', 'id' => 'password_confirm')); ?> plugin('label', 'password_confirm', 'Re-enter
New Password'); ?>
Passwords must match