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

Forum

How to Hide Register Link in User Login module
Last Post 2007-12-10 08:21 AM by Lee Sykes. 6 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
aliasncnuUser is Offline
Nuke Newbie
Nuke Newbie
Posts:6

--

      <td id="tdRegister" runat="server" colspan="2" align="left"><asp:Linkbutton id="cmdRegister" resourcekey="cmdRegister" cssclass="CommandButton" text="Register" runat="server"/>
     -->

and register link is hidden.

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

Regards,
Ricky.

2007-12-07 02:45 AM  

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 <dnn:USER runat="server" id="dnnUSER" /> 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
     <!--

Joseph CraigUser is Online
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9316
Avatar

--
2007-12-07 02:28 PM  
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 DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
tlyczkoUser is Offline
Nuke Ace
Nuke Ace
Posts:41

--
2007-12-07 06: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
Joseph CraigUser is Online
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9316
Avatar

--
2007-12-07 09: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 DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
tlyczkoUser is Offline
Nuke Ace
Nuke Ace
Posts:41

--
2007-12-08 12:00 AM  
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" %><dnn:USER runat="server" id="dnnUSER" CssClass="SkinItem" />

The user control must not be commented out.

http://www.snapsis.com/Support/DotN...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...fault.aspx

See also:
http://www.snapsis.com/DNN-Tips-And...abels.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
aliasncnuUser is Offline
Nuke Newbie
Nuke Newbie
Posts:6

--
2007-12-09 11: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...fault.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.

Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2007-12-10 08: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/DNNCreative

Lee Sykes's Facebook Profile
You are not authorized to post a reply.

Active Forums 4.3

Latest Forum Posts

Issue after making site Live by Sameer
Hi All i am using DNN 6.1.3 for my site every on my server working good but as i send the databas
User Autrhority by Kaustav
Hi, Here are the requirements for my site • PDF documents repository, each doc less th
RE: Active Forums vs. DNN 6.2 CE by Pingle2009
I haven't previewed DNN 6.2 RC either (nor, by default, the AF Beta module). My understanding from p
RE: DNN 6.2 by Sameer
Thanks joseph my issue is resolve
RE: PCI Compliance with PayPal integration by Joseph Craig
I'm hardly an expert. I took a quick look at http://www.pcicomplianceguide.org/pcifaqs.php. He
PCI Compliance with PayPal integration by Aggiedan97
Recently it was brought to my attention that sites (companies of sites) that handle the selling of g
RE: Active Forums vs. DNN 6.2 CE by Joseph Craig
I haven't really previewed it, but my understanding is that pretty much everything except the "Mail
RE: horizontal main and submenu items by Joseph Craig
If you could show a page as an example, that would help. Basically, you can put multiple menus on
Active Forums vs. DNN 6.2 CE by Aggiedan97
Active Forums will no longer be offered with the debut of DNN 6.2 which is promising to integrate Ac
Google Analytics Module by Aggiedan97
I'm in need of providing a GA module that displays GA charts, graphs, and reports internal to DNN si
RE: horizontal main and submenu items by Dan Glanton
I'm not sure. One of the tutorials show using 2 horizontal menus with one being the submenu. This do
RE: Different search icon for each portal by Joseph Craig
Are you using the same skin in each portal? If so, and assuming that you are using the SiteIconURL
Different search icon for each portal by Bill Swanson
How do I use a different search icon for each portal in dnn 6.1.4?
RE: horizontal main and submenu items by Joseph Craig
Do your requirements fit with any of the available templates?
RE: horizontal main and submenu items by Dan Glanton
I went ahead and upgraded to the DDR to make sure I have the best updated menu possible. What I woul
RE: DNN 6.2 by Joseph Craig
The release notes that came with the beta version of the software should indicate if the version can
RE: horizontal main and submenu items by Joseph Craig
Part of the answer will depend on the menu that you are using in your skin. I strongly recommend th
DNN 6.2 by Sameer
Hi All i am using dnn 6.2 beta version for my demo site i need to custmize the 4 modules in that
RE: Deploying dnn by Sameer
Thanks a lot so kind of you
RE: Unable to Create Skin Package by schilders
Joe, When I click the Edit icon next to the skin package on the Host Extensions page, I receive t
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds