96) { (new MessageCookie("Password must be 8-96 characters", "register"))->setCookie(); header("Location: account.php"); } else { if (UserManager::auth($user['username'], $password) != NULL) { UserManager::changePassword($user['username'], $newPassword); header("Location: index.php"); } else { $msg = new MessageCookie("Invalid password", "register"); $msg->setCookie(); header("Location: account.php"); } } } else { $msg = new MessageCookie("You must be logged in to do that", "register"); $msg->setCookie(); header("Location: account.php"); }