protected void RegisterUser_CreatedUser(object sender, EventArgs e) { FormsAuthentication.SetAuthCookie(RegisterUser.UserName, createPersistentCookie: false); QueensBookStore.Logic.ShoppingCartActions usersShoppingCart = new QueensBookStore.Logic.ShoppingCartActions(); String cartId = usersShoppingCart.GetCartId(); usersShoppingCart.MigrateCart(cartId, RegisterUser.UserName.ToString()); string continueUrl = RegisterUser.ContinueDestinationPageUrl; if (!OpenAuth.IsLocalUrl(continueUrl)) { continueUrl = "~/"; } Response.Redirect(continueUrl); }
protected void LoginCtrl_LoggedIn(object sender, EventArgs e) { QueensBookStore.Logic.ShoppingCartActions usersShoppingCart = new QueensBookStore.Logic.ShoppingCartActions(); String cartId = usersShoppingCart.GetCartId(); usersShoppingCart.MigrateCart(cartId, User.Identity.Name.ToString()); }