示例#1
0
        protected void BindData()
        {
            Guid?accountActivationToken = CommonHelper.QueryStringGUID("ACT");

            if (!accountActivationToken.HasValue)
            {
                Response.Redirect("~/Default.aspx");
            }
            else
            {
                string   email    = CommonHelper.QueryString("Email");
                Customer customer = CustomerManager.GetCustomerByEmail(email);
                if (customer != null)
                {
                    if (customer.AccountActivationToken.ToLower() == accountActivationToken.Value.ToString().ToLower())
                    {
                        CustomerManager.Activate(customer.CustomerID, true);
                        customer.AccountActivationToken = string.Empty;
                        lResult.Text = GetLocaleResourceString("Account.AccountHasBeenActivated");
                    }
                    else
                    {
                        Response.Redirect("~/Default.aspx");
                    }
                }
                else
                {
                    Response.Redirect("~/Default.aspx");
                }
            }
        }