You need to Register for free and Login to post a message in the forum.

Forum

Subject: How to Hide Register Link in User Login module
Prev Next
You are not authorized to post a reply.

Author Messages
aliasncnu
Nuke Newbie
Nuke Newbie
Posts:6

06 Dec 2007 9:45 PM  

Hi,
I place a User Account module on my homepage. How can I hide the Register Link upon it?
Someone told me to remove the in my skin should work well. But after making a experiment, it seems not working for DNN 4.7.

Finally, I found under admin/Authentication/ there is a Login.ascx. I comment the markup
    

and register link is hidden.

is there any more flexibile way to achieve instead modifying the DNN core?

Regards,
Ricky.

jncraig
DNN Creative Staff
Nuke Master II
Nuke Master II
Posts:2318


07 Dec 2007 9:28 AM  
You will find some code similar to these in your skins:

               < dnn:USER runat="server" id="dnnUSER" / >
               < dnn:LOGIN runat="server" id="dnnLOGIN" / >

The first on displays Register/DisplayName and the second displays Login/Logout.  You can remove either or both of these from a skin.

If you are interested in some possibilities for conditionally including these or other items in your skin or pages, take a look at this thread in the Snapsis.com.

I've use techniques found in that thread on a site that I run.  The USER and LOGIN controls aren't displayed when the site is viewed by an unauthenticated visitor.  Instead, they see the Login module (visibility controlled by Security Role).  When a user logs in, the Login module disappears and the USER and LOGIN links, as well as some other stuff) is shown in the upper right.  Turning USER and LOGIN on and off is accomplished with conditional code in the skin.

Joe Craig
DNN Creative Support
Subscribe to the website
tlyczko
Nuke Ace
Nuke Ace
Posts:41

07 Dec 2007 1:02 PM  
I figured it out partway from a post in that thread, this pseudocode is what one needs in the ascx file instead of the standard call to the USER token:

<%=IIf(Request.IsAuthenticated, "Show the user name", "")%>

How would one code showing the username within this IIf statement??

Thanks, Tom
jncraig
DNN Creative Staff
Nuke Master II
Nuke Master II
Posts:2318


07 Dec 2007 4:24 PM  
Here is some code that I have used:

            < %  If DotNetNuke.Security.PortalSecurity.IsInRole("Registered Users")  Then% >
                < td align="right" height="100%" style="width: 100%"  >
                    < div id="LoginUserContainer" >
                        < dnn:User cssclass="BannerLinks" runat="server" id="dnnUser" url="" / >  
                    
                        < %  If DotNetNuke.Security.PortalSecurity.IsInRole("Registered Users") % > 
                
                               user code goes in here!

                        < % End If % >
                       
                                              
                        < dnn:Login runat="server" cssclass="BannerLinks" id="dnnLogin" / >                       
                    < /div >
                < /td >         
             < % End If % >


Maybe this will give you some ideas.

Joe Craig
DNN Creative Support
Subscribe to the website
tlyczko
Nuke Ace
Nuke Ace
Posts:41

07 Dec 2007 7:00 PM  
Use this code, I got it from John Mitchell at Snapsis, we went back and forth a bit on it.

<% If NOT Request.IsAuthenticated Then dnnUser.Visible = "false" %>

The user control must not be commented out.

http://www.snapsis.com/Support/DotNetNukeSupport/tabid/560/forumid/12/tpage/3/view/topic/postid/5003/Default.aspx#7894, this goes to page three of the thread for this specific stuff, though there's other useful things in too.

This will display "Login" only for non-authenticated users, and the User Name for authenticated users, such as host, admin, people in site/portal-based roles.

I put this in my SKIN only -- not anywhere else.

See also: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/12/threadid/165067/scope/posts/Default.aspx

See also:
http://www.snapsis.com/DNN-Tips-And-Tricks/tabid/560/forumid/12/postid/7893/view/topic/Tip--Change-DNN-system-text-labels.aspx

The first one is in the Admin panel of the host/portal and is site-wide for not showing user registration.
The second one is for editing language files etc.

HTH Tom
aliasncnu
Nuke Newbie
Nuke Newbie
Posts:6

09 Dec 2007 6:52 PM  

I am not sure whether this workaround is goes well in previous versions, but for 4.7.x this should not work. See the reply in http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/108/threadid/184743/scope/posts/threadpage/1/Default.aspx by Bilal Al-Ghazi. Of course, I am uncetain whether it is correct!

Now, I must comment asp:Linkbutton id="cmdRegister" resourcekey="cmdRegister" cssclass="CommandButton" text="Register" runat="server"/ within admin/authentication/Login.ascx to hide the link.

Any suggestion is welcome.

Regards,
Ricky.

leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3311

10 Dec 2007 3:21 AM  
Posted By aliasncnu on 06 Dec 2007 9:45 PM

Hi,
I place a User Account module on my homepage. How can I hide the Register Link upon it?


There is a much easier way to remove the Register link from the account module and the skin.

go to the admin menu/site settings
advanced settings
security settings
under 'user registration' select none

Thanks,


Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
You are not authorized to post a reply.
Forums > DotNetNuke® > DotNetNuke® Questions > How to Hide Register Link in User Login module



ActiveForums 3.7

Latest Forum Posts

Site is not opening by kaustav_kar
Hi,Whenever I'm writing the url (http://tajfood.com.sa/) it's showing the following error; Index of...
RE: SolPart Menu Font Color Control by cdees
 Lee, Is there documentation, or perhaps a tutotial on activating and using Nav menu?  Where would I...
RE: EasyCGI help? by Dr Joe
I found some interesting posts on some other sites that explain some of the challenges I've been exp...
RE: Menu's, menu's, and more menu's! by roadshow41
Thanks! I'm still a bit curious about some of the other options, but I think that gives me enough c...
RE: Menu's, menu's, and more menu's! by leesykes
Hello,Yes that should be possible with snapsis, I have used snapsis CSS with flyout menus on a horiz...
RE: Menu's, menu's, and more menu's! by roadshow41
I typically end up using a hybrid of a vertical menu and a horizontal menu due to the sheer number o...
DotNetNuke SEO (Search Engine Optimization) by leesykes
Hello,I regularly get asked for tips on SEO with DotNetNuke, there are several resources available o...
RE: Menu's, menu's, and more menu's! by leesykes
Hello,If you are looking for a menu for SEO reasons, any CSS based unordered list menu will be SEO f...
Menu's, menu's, and more menu's! by roadshow41
Well, I've been trying to steam ahead with the DNN sites I inherited a few months ago.  I've found l...
RE: EasyCGI help? by derpir
Hi Lee I told them that solution two days ago and still no answer, but thanks for suggesting that s...
RE: quick question by derpir
Hithanks! yes I understand. I will deal with my skins more tomorrow, maybe some questions will arriv...
RE: Restart Application by leesykes
It will restart your DotNetNuke installation and reload the application.Clearing cache will clear th...
RE: How can i edit any module from front end by leesykes
hello,I have just tested this and can see exactly the same as you, I suspect the core team have set ...
RE: EasyCGI help? by leesykes
You may want to ask them to reset the correct permissions on your DotNetNuke installation files, som...
RE: quick question by leesykes
Hello,It will be possible to a degree, but it depends on how both of the skins have been built. You ...
RE: EasyCGI help? by Dr Joe
I'll let you know how it works out. I think I opened up about 6 tickets with them so far. ...
RE: EasyCGI help? by derpir
Hi Joe amazing to say the least! I will change host to PowerDNN as soon as possible, seems to me t...
RE: EasyCGI help? by Dr Joe
Amazing - I'm going through this exact same thing with EasyCGI! I managed to successfully instal...
Running the local host installation after building the application by saintX
My localhost installation of DNN was running blameless. After I oppened the application with VWD it ...
RE: quick question by derpir
Hello Is it possible to buy two skins and combine them? for example put one skins visual attributes...
AppTheory
RSS Feeds