コード例 #1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            LoadSettings();
            GetGuidFromQueryString();
            if (this.registrationConfirmationGuid == Guid.Empty)
            {
                WebUtils.SetupRedirect(this, SiteRoot);
                return;
            }

            SiteUser siteUser = SiteUser.GetByConfirmationGuid(siteSettings, registrationConfirmationGuid);

            if (SiteUser.ConfirmRegistration(this.registrationConfirmationGuid))
            {
                this.lblMessage.Text = Resources.Resource.RegisterConfirmMessage;
                if (siteUser != null)
                {
                    NewsletterHelper.VerifyExistingSubscriptions(siteUser);
                    NewsletterHelper.ClaimExistingSubscriptions(siteUser);

                    if ((windowsLive != null) && (liveUser != null))
                    {
                        HandleWindowsLiveConfirmation(siteUser);
                    }
                }

                AnalyticsAsyncTopScript asyncAnalytics = Page.Master.FindControl("analyticsTop") as AnalyticsAsyncTopScript;
                if (asyncAnalytics != null)
                {
                    asyncAnalytics.PageToTrack = "/RegistrationConfirmed.aspx";
                }
                else
                {
                    mojoGoogleAnalyticsScript analytics = Page.Master.FindControl("mojoGoogleAnalyticsScript1") as mojoGoogleAnalyticsScript;
                    if (analytics != null)
                    {
                        analytics.PageToTrack = "/RegistrationConfirmed.aspx";
                    }
                }
            }
            else
            {
                WebUtils.SetupRedirect(this, SiteRoot);
                return;
            }
        }