BgEngine.Security.Services.CodeFirstSecurity.Login C# (CSharp) Method

Login() public static method

public static Login ( string userNameOrEmail, string password, bool persistCookie ) : bool
userNameOrEmail string
password string
persistCookie bool
return bool
        public static bool Login(string userNameOrEmail, string password, bool persistCookie)
        {
            CodeFirstExtendedProvider provider = VerifyProvider();
            dynamic success = provider.ExtendedValidateUser(userNameOrEmail, password);
            if (!(string.IsNullOrEmpty(success)))
            {
                FormsAuthentication.SetAuthCookie(success, persistCookie);
                return true;
            }
            else
            {
                return false;
            }
        }