Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string email    = Request["loginEmail"];
        string password = Request["loginPassword"];

        if (email != null && password != null && Request["submit"] != null)
        {
            email = email.Replace("'", "");
            if (DataLink.Exists(email, password))
            {
                AccessControl.LogIn(this, email, DataLink.IsAdmin(email));
                loginResponse = "You have logged in successfully.";
                Response.Redirect("Homepage.aspx");
            }
            else
            {
                loginResponse = "Email and password don't match";
            }
        }
    }