getMessage() == '[clickKey-short]') { $errorCode = 'short'; include('password-reset-error.php'); exit; } } function checkClickKeyFormat ( $clickKey ) { if( strlen($clickKey) != 32 || substr($clickKey, 30) != '-Z' ) { throw new Exception('[clickKey-short]'); } return substr($clickKey, 0, 30); } $conn = maintainDBConnection(); $clickKeyRec = $conn->getRow( "SELECT expiry_ts < CURRENT_TIMESTAMP AS has_expired " . " , exhausted " . " FROM user_password_reset_click_keys " . " WHERE click_key = ? " , array($clickKey) ); if( ! $clickKeyRec ) { $errorCode = 'not-found'; include('password-reset-error.php'); exit; } else if( $clickKeyRec['has_expired'] == 't' ) { $errorCode = 'expired'; include('password-reset-error.php'); exit; } else if( $clickKeyRec['exhausted'] == 't' ) { $errorCode = 'exhausted'; include('password-reset-error.php'); exit; } ?>


Enter a new password

Must be at least 6 characters
Type password again for verification.