Passwords must be atleast 8 characters long";
}
else
{
$userid = (int)confirmPasswordReset($token);
if ($userid > 0)
{
if (changePasswordUid($userid, $newpassword))
{
logoutAllSessions($userid);
$alert = "
Password updated
";
}
else
{
$alert = "An error occurred, contact an admin
";
}
}
else
{
WebContextManager::Redirect("/forgotpassword");
}
}
}
else
{
$alert = "The passwords you entered do not match
";
}
}
}
else
{
WebContextManager::Redirect("/");
}
}
else
{
WebContextManager::Redirect("/");
}
$body = <<
{$alert}
EOT;
pageHandler();
$ph->pageTitle("Reset Password");
$ph->body = $body;
$ph->output();
?>