private bool SqlAuthenticateAndLogin(string username, string password) { var user = sessionFactory().QueryOver <User>() .Where(u => u.Username == username && u.Password == SqlFunnelWebMembership.HashPassword(password)) .SingleOrDefault(); if (user != null) { FormsAuthentication.SetAuthCookie(username, true); return(true); } return(false); }
private bool SqlAuthenticateAndLogin(string username, string password) { var user = sessionFactory() .QueryOver <User>() .Where(u => u.Username == username && u.Password == SqlFunnelWebMembership.HashPassword(password)) .SingleOrDefault(); if (user == null) { return(false); } federatedAuthenticationService.Login(user); return(true); }