diff --git a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs index beb07096a..490b6695b 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs @@ -125,6 +125,10 @@ namespace Orchard.Users.Controllers { return RedirectToAction("ChallengeEmailSent"); } + if (user.As().RegistrationStatus == UserStatus.Pending) { + return RedirectToAction("RegistrationPending"); + } + _authenticationService.SignIn(user, false /* createPersistentCookie */); return Redirect("~/"); } @@ -174,6 +178,10 @@ namespace Orchard.Users.Controllers { } } + public ActionResult RegistrationPending() { + return View(); + } + public ActionResult ChangePasswordSuccess() { return View(); } diff --git a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj index c08223b12..0e6484899 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj +++ b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj @@ -128,6 +128,7 @@ + diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/RegistrationPending.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/RegistrationPending.cshtml new file mode 100644 index 000000000..cb4755646 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/RegistrationPending.cshtml @@ -0,0 +1,3 @@ +@model dynamic +

@Html.TitleForPage(T("User Registration Pending").ToString())

+

@T("Your user account has been created but has to be approved before it can be used.")

diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml index b34c9c324..c839341bf 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml @@ -9,7 +9,7 @@
@Html.EditorFor(m => m.UsersMustValidateEmail) - + @Html.ValidationMessage("UsersMustValidateEmail", "*")