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.
14 anni tempo fa
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
14 anni tempo fa
1. Open \Controls\BaseNopPage.cs file
2. Modify OnLoad method. Source code is self-describing (add "register.aspx" page)
14 anni tempo fa
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")))
14 anni tempo fa
Thanks for suggestion
14 anni tempo fa
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);
                    }
                }
14 anni tempo fa
alanimal

Correct
14 anni tempo fa
works a treat - thanks mate - fantastic product by the way.
14 anni tempo fa
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.