示例#1
0
        public ActionResult Success()
        {
            if (RemoteUser.IsListedInSpamDatabase(this.Tenant))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant)));
            }

            return(this.View(this.GetRazorView <AreaRegistration>("ChangePassword/Success.cshtml", this.Tenant)));
        }
示例#2
0
        public ActionResult ResetEmailSent()
        {
            if (RemoteUser.IsListedInSpamDatabase(this.Tenant))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant)));
            }

            return(this.View(this.GetRazorView <AreaRegistration>("Reset/ResetEmailSent.cshtml", this.Tenant)));
        }
示例#3
0
        public ActionResult Index()
        {
            if (RemoteUser.IsListedInSpamDatabase(this.Tenant))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant)));
            }

            return(this.View(this.GetRazorView <AreaRegistration>("Reset/Index.cshtml", this.Tenant), new Reset()));
        }
示例#4
0
        public async Task <ActionResult> IndexAsync()
        {
            if (RemoteUser.IsListedInSpamDatabase(this.Tenant))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant)));
            }

            var profile = await ConfigurationProfiles.GetActiveProfileAsync(this.Tenant).ConfigureAwait(true);

            if (!profile.AllowRegistration ||
                this.User.Identity.IsAuthenticated)
            {
                return(this.Redirect("/dashboard"));
            }

            return(this.View(this.GetRazorView <AreaRegistration>("SignUp/Index.cshtml", this.Tenant)));
        }
示例#5
0
        public async Task <ActionResult> ConfirmAsync(string token)
        {
            if (RemoteUser.IsListedInSpamDatabase(this.Tenant))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant)));
            }

            var id = token.To <Guid>();

            if (!await Registrations.ConfirmRegistrationAsync(this.Tenant, id).ConfigureAwait(true))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("SignUp/InvalidToken.cshtml", this.Tenant)));
            }

            var registration = await Registrations.GetAsync(this.Tenant, id).ConfigureAwait(true);

            var email = new WelcomeEmail(registration);
            await email.SendAsync(this.Tenant).ConfigureAwait(true);

            return(this.View(this.GetRazorView <AreaRegistration>("SignUp/Welcome.cshtml", this.Tenant)));
        }
示例#6
0
        public async Task <ActionResult> DoAsync(string token)
        {
            if (RemoteUser.IsListedInSpamDatabase(this.Tenant))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant)));
            }

            if (string.IsNullOrWhiteSpace(token))
            {
                return(this.Redirect("/site/404"));
            }


            var reset = await ResetRequests.GetIfActiveAsync(this.Tenant, token).ConfigureAwait(true);

            if (reset == null)
            {
                return(this.Redirect("/site/404"));
            }

            return(this.View(this.GetRazorView <AreaRegistration>("Reset/Do.cshtml", this.Tenant)));
        }