CapRaffle.Domain.Implementation.AccountRepository.Authenticate C# (CSharp) Method

Authenticate() public method

public Authenticate ( string email, string password ) : bool
email string
password string
return bool
        public bool Authenticate(string email, string password)
        {
            User user = GetUserByEmail(email);
            if (user != null)
            {
                String passwd = CreatePasswordHash(password, CreateSalt(email));
                if (user.Password.Equals(passwd))
                {
                    FormsAuthentication.SetAuthCookie(email, false);
                    return true;
                }
            }
            return false;
        }