Quick Nav:  Online Store   |   Login | Register

Require User Login

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Mark Townsend
<50 Posts
Posts:26


04/19/2008 10:09 PM  

Firstly, let me say, I am not sure if this problem is a menu problem or a security/setup problem. 

On my website I have several support pages, these pages should be visible in the menu all the time,  But if a user who has not yet logged in attempts to opn one of these pages it should divert them to the login page, and define the return url to return to the support page once the login, or registration, is complete.

Can anyone tell me how to achieve this. 

Thanks

 

John Mitchell
Posts:3084


04/20/2008 10:08 AM  
Hi Mark,
You can do that by making the page visible to all users, but make the modules on the page require login.
Mark Townsend
<50 Posts
Posts:26


04/21/2008 5:56 AM  
What you suggested worked well, I also added a login control only visible to non-authenticate users to help them login. The only problem I have is when they login, it takes them back to the home page, any idea how I can keep them on this page? I know this is off topic, but have asked the same question in other places, but got no replies.
John Mitchell
Posts:3084


04/21/2008 7:36 AM  
Since the login module is on the page that you want to stay on it isn't getting a returnUrl variable on the querystring and so it goes back to the home page. It may work if you were able to include a hidden text field on that page with the returnUrl in it, but I have never tried it.

You may have to just let them login on a seperate page so that they are take back to that page. I thought it would redirect them to the login page with the returnUrl already in place if they were not logged in, is that not happening?
Mark Townsend
<50 Posts
Posts:26


04/21/2008 1:18 PM  
If I don;t have the login control on the page, when I select the support page, the page shows with no content. No hint of a redirect to a login page. If this cannot be done I see it as a major oversight in DNN. This is something used on many websites.

Thanks

Mark
John Mitchell
Posts:3084


04/21/2008 1:38 PM  
Interesting. I guess that is not a DNN thing, but it happens on my "My Orders" page. maybe it is the My Orders module from Catalook that is doing the redirect.

You could do it by hiding the current page from the menu and marking it as secure, then create a new page that is visible in the menu, but set it as a link to an external page and then put your link back to the orginal page there.

This will create a menu item that is not hidden which will point to a hidden page that needs the user to login.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.



ActiveForums 3.7
Powered by: Snapsis Software