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 III
Nuke Master III
Posts:3747


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 III
Nuke Master III
Posts:3747


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:3960


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

Background colour by petecarrick
Hi,Sorry if this is a real dumb question, I've been experimenting with the Vortex skin and I have ch...
RE: Horizontal menu vertical borders by petecarrick
That worked perfectly, thanks very much Lee.Pete
Change Login Page by edeakin
Hey guys it’s me again. Great work on session 46 keep up the great work! I want to be able to add m...
RE: Module Wrapper & Tab Aggregator?? by gbrown
Found the Ajax Module Wrapper from Gumbosoft. Bought it and tried it - it works inside of Tab Aggreg...
Module Wrapper & Tab Aggregator?? by gbrown
Has anybody tried to place a Module Wrapper module from ZLDNN inside a Tab Aggregator module from DN...
RE: SWF Tutorial Conversion by raymueller
Thanks and I will continue to research. Each of the applications pick up the introduction (~ 20-25 s...
RE: Please do review by leesykes
There are a couple of things that you could look at:Initial page load time of the sites was slow, t...
RE: Module Development - Settings Page by leesykes
thanks for letting us know the solution and if there's anything else we can help out with please let...
RE: SWF Tutorial Conversion by leesykes
not sure, its not something I have tried, the swf should convert, perhaps its worth googling around ...
RE: not been able to download videos by leesykes
Normal 0 unctuationKerning/> false false false oNotPromoteQF/> ...
RE: Styling the main menu by leesykes
When you add code to your skin.css file, make sure you press CTRL+F5 to reload the page and reload t...
RE: Horizontal menu vertical borders by leesykes
To find the id of the menu item, use the web developers toolbar for Firefox, go to information menu...
RE: Module Development - Settings Page by HMDevelopment
Hello Lee. No thanks -- I have still earned value from this site. I did quite a few 'video' tutor...
RE: Can I modify the Default Events module only for a Portal? by jncraig
If you create a skin for your site, it will apply only to your site.  Also, portal.css applies only ...
RE: How to prevent auser from multiple login. by jncraig
I'm not aware of a way to do that.
RE: Display main menu and sub menus in different locations by jncraig
I would recommend that you study our tutorials regarding skin development as a good start.The exact ...
SWF Tutorial Conversion by raymueller
I have been trying to convert some of the older SWF tutorials to a format that I can load on my Zune...
SWF Tutorial Conversion by raymueller
I have been trying to convert some of the older SWF tutorials to a format that I can load on my Zune...
Can I modify the Default Events module only for a Portal? by pmanyara
Dear Colleagues,I manage a site, which is a portal in a larger dotnetnuke environment with several p...
RE: Styling the main menu by knuterik
Lee, Your test code for the partners menu item works fine now. I don't know why it didn't work th...
DNN Creative Subscribe
RSS Feeds