protected void Login_Click(object sender, EventArgs e) { String inEmail = email.Value.ToString(); String inPass = Password.Value.ToString(); if (inEmail != null && inPass != null) { if (Database.FirebaseUsers.VerifyLogin(inEmail, inPass)) { Cookies.WriteCookie(inEmail, this.Response); Response.Redirect("Leaderboard.aspx"); } else { Error_Flag.Visible = true; } } }
protected void Register_ServerClick(object sender, EventArgs e) { if (Password.Value.ToString().Equals(Password1.Value.ToString())) { try { string userName = Name.Value.ToString(); Database.FirebaseUsers.CreateUser(userName, Password.Value.ToString()); Cookies.WriteCookie(userName, this.Response); Response.Redirect("JoinGroup.aspx"); } catch { Error_Flag.Visible = true; Error_Flag.InnerText = "This username is already in use."; } } else { Error_Flag.Visible = true; Error_Flag.InnerText = "Passwords do not match."; } }