#18425: Send challenge email could use a wrong root url

Work Item: 18425

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-02-28 13:16:53 -08:00
parent c0dc59c417
commit b101224b6a

View File

@@ -150,7 +150,9 @@ namespace Orchard.Users.Controllers {
siteUrl = HttpContext.Request.ToRootUrlString();
}
_userService.SendChallengeEmail(user.As<UserPart>(), nonce => VirtualPathUtility.Combine(siteUrl, Url.Action("ChallengeEmail", "Account", new { Area = "Orchard.Users", nonce = nonce })));
siteUrl = siteUrl.TrimEnd('/');
_userService.SendChallengeEmail(user.As<UserPart>(), nonce => siteUrl + "/" + Url.Action("ChallengeEmail", "Account", new {Area = "Orchard.Users", nonce = nonce}).TrimStart('/') );
foreach (var userEventHandler in _userEventHandlers) {
userEventHandler.SentChallengeEmail(user);