Fixes 27687

[TFS Changeset #70186]
This commit is contained in:
hartvig
2010-06-20 09:43:14 +00:00
parent 05846327f6
commit 67f17eb4bb

View File

@@ -564,11 +564,20 @@ namespace umbraco.providers
/// </returns>
public override bool ValidateUser(string username, string password)
{
User user = new User(username);
if (user != null && user.Id != -1)
// we need to wrap this in a try/catch as passing a non existing
// user will throw an exception
try
{
if (user.Disabled) return false;
else return user.ValidatePassword(EncodePassword(password));
User user = new User(username);
if (user != null && user.Id != -1)
{
if (user.Disabled) return false;
else return user.ValidatePassword(EncodePassword(password));
}
}
catch
{
// nothing to catch here - move on
}
return false;