BUG: Only REGISTERED USERS can REGISTER as new users

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 14 años
Yep, that's it.
If you turn on the "Allow navigation only for registered customers" set, no new users can register themselves. They are sent back to login page when they click in Register in login page.

Any help to solve this issue without waiting for next release?

Marcio
Hace 14 años
1. Open \Controls\BaseNopPage.cs file
2. Modify OnLoad method. Source code is self-describing (add "register.aspx" page)
Hace 14 años
If you are using 'captcha' , you must also include
&& (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/captchaimage.aspx")) 
to allow the image to appear

and probably best also:
&& (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/passwordrecovery.aspx"))





EDIT:
recommend:


                    //it's not login/logout page
                    if ((!CommonHelper.GetThisPageURL(false).ToLower().Contains("/login.aspx"))

                        && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/register.aspx"))
                        && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/contactus.aspx"))
                        && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/captchaimage.aspx"))
                        && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/passwordrecovery.aspx"))

                        && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/logout.aspx")))
Hace 14 años
Thanks for suggestion
Hace 14 años
does this look correct?

if (NopContext.Current.User == null || NopContext.Current.User.IsGuest)
                {
                    //it's not login/logout page
                    if ((!CommonHelper.GetThisPageURL(false).ToLower().Contains("/login.aspx"))
                        && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/logout.aspx"))
      && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/captchaimage.aspx")
      && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/passwordrecovery.aspx"))
      && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/register.aspx")))

                    {
                        string loginURL = CommonHelper.GetLoginPageURL(false);
                        Response.Redirect(loginURL);
                    }
                }
Hace 14 años
alanimal

Correct
Hace 14 años
works a treat - thanks mate - fantastic product by the way.
Hace 14 años
Thanks for the tip guys!

      && (!CommonHelper.GetThisPageURL(false).ToLower().Contains("/captchaimage.aspx") -is missing an extra ')' in the end
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.