I hope this helps others as it took me some time to work this out
The issue occurs when you use DNN 6 and am utilising Verified Registrations. Typically you setup a page which requires a user to be registered and when they click on a link to that page, and they are not registered, they get redirected to the login page. They then click on the Register button which takes them to the registration page. All the time the ReturnURL parameter is being carried along so that the user can return to the original page they were trying to get to after they register.
Problem:
After the user registers they get redirected to a page which displays the contents of the "VerifiedConfirmationMessage" key in the shared localisation file even if the value of ReturnURL is not empty.
Solution 1:
This means that if you want your site to behave like it did prior to this functionality in DNN6 you need to delete the contents of "VerifiedConfirmationMessage" in the shared resource file
Solution 2:
Modifiy the contents to add a button called something like "Contune" which contains the link of value <%= ReturnURL %>
Also:
If you are like me I don't want the verifiation email to contain a link to complete verification. Typically for me they are on there way to a particular page so the last thing I want is for them to click on the link in the email. To remove this link look for EMAIL_USER_REGISTRATION_VERIFIED_BODY.Text in the GlobalResources.resx and take the link out.
Suggested Changes to Core DNN:
Also I personally think that the code that handles all this should be modified. Currently the code looks like below in the MangeUsers.ascx.cs. I think the line
if (Convert.ToInt32(setting) == Null.NullInteger)
should be
if (Convert.ToInt32(setting) == Null.NullInteger && RedirectURL.Length == 0)
Current Code:
private void UserCreateCompleted(object sender, UserUserControlBase.UserCreatedEventArgs e)
{
string strMessage = "";
try
{
if (e.CreateStatus == UserCreateStatus.Success)
{
//hide the succesful captcha
captchaRow.Visible = false;
strMessage = CompleteUserCreation(e.CreateStatus, e.NewUser, e.Notify, IsRegister);
if (IsRegister)
{
if ((string.IsNullOrEmpty(strMessage)))
{
Response.Redirect(RedirectURL, true);
}
else
{
object setting = GetSetting(PortalId, "Redirect_AfterRegistration");
if (Convert.ToInt32(setting) == Null.NullInteger)
{
DisableForm();
cmdRegister.Visible = false;
loginLink.Visible = true;
}
else //redirect to after registration page
{
Response.Redirect(RedirectURL, true);
}
DisableForm();
cmdRegister.Visible = false;
loginLink.Visible = true;
}
}
else
{
Response.Redirect(ReturnUrl, true);
}
}
else
{
AddLocalizedModuleMessage(UserController.GetUserCreateStatus(e.CreateStatus), ModuleMessage.ModuleMessageType.RedError, true);
}
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}