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

Correct
Il y a 14 ans
works a treat - thanks mate - fantastic product by the way.
Il y a 14 ans
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.