private Boolean IsAuthenticated(String username, String password)
{
String passhash = UnitOfWork
.Select<Account>()
.Where(account => account.Username.ToLower() == username.ToLower())
.Select(account => account.Passhash)
.SingleOrDefault();
Boolean isCorrect = Hasher.VerifyPassword(password, passhash);
if (!isCorrect)
Alerts.AddError(Validations.IncorrectAuthentication);
return isCorrect;
}
private Boolean IsCorrectPassword(Int32 accountId, String password)