private bool CheckPassword(string storedPassword, string inputPassword)
{
var validated = false;
if (storedPassword == string.Empty)
{
// This is a special case used for resetting.
if (string.Compare(inputPassword, "admin", true) == 0)
{
validated = true;
}
}
else
{
if (this.passwordFormat == MembershipPasswordFormat.Hashed)
{
if (storedPassword == Utils.HashPassword(inputPassword))
{
validated = true;
}
}
else if (inputPassword == storedPassword)
{
validated = true;
}
}
return validated;
}