Adding a "Go back to where you were" link to post-registration pages, fixes #2295

This commit is contained in:
Lombiq
2015-10-26 18:44:19 +01:00
parent 968e6b965b
commit db92e1a803
3 changed files with 4 additions and 2 deletions

View File

@@ -150,11 +150,11 @@ namespace Orchard.Users.Controllers {
_userService.SendChallengeEmail(user.As<UserPart>(), nonce => Url.MakeAbsolute(Url.Action("ChallengeEmail", "Account", new {Area = "Orchard.Users", nonce = nonce}), siteUrl));
_userEventHandler.SentChallengeEmail(user);
return RedirectToAction("ChallengeEmailSent");
return RedirectToAction("ChallengeEmailSent", new { ReturnUrl = returnUrl });
}
if (user.As<UserPart>().RegistrationStatus == UserStatus.Pending) {
return RedirectToAction("RegistrationPending");
return RedirectToAction("RegistrationPending", new { ReturnUrl = returnUrl });
}
_userEventHandler.LoggingIn(userName, password);

View File

@@ -1,3 +1,4 @@
@model dynamic
<h1>@Html.TitleForPage(T("Challenge Email Sent").ToString()) </h1>
<p>@T("An email has been sent to you. Please click on the link it contains in order to have access on this site.") </p>
<p>@Html.Link(T("Go back to where you were"), Url.Content(Request.QueryString["ReturnUrl"]))</p>

View File

@@ -1,3 +1,4 @@
@model dynamic
<h1>@Html.TitleForPage(T("User Registration Pending").ToString()) </h1>
<p>@T("Your user account has been created but has to be approved before it can be used.")</p>
<p>@Html.Link(T("Go back to where you were"), Url.Content(Request.QueryString["ReturnUrl"]))</p>