Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...ReturnURL on Verified Registration IssuesReturnURL on Verified Registration Issues
Previous
 
Next
New Post
2/1/2012 7:42 PM
 
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);
            }
        }






 
New Post
2/1/2012 8:37 PM
 

Extra note.

Solution 2 should be <%=RedirectURL %>

but i can't get this to work so would love to see if someone else can

Thanks

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...ReturnURL on Verified Registration IssuesReturnURL on Verified Registration Issues


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out