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 09: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 03: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 Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9005
Avatar

--
2007-12-07 03: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 07: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 Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9005
Avatar

--
2007-12-07 10: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 01: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-10 12:52 AM  

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

Enforce Terms Tutorial Update by Vistalogix Corporation
I tried configuring my DNN 6.1.2 install to have a required "accept terms" checkbox as described in
RE: Best Practices for Modifying a Custom Module by Joseph Craig
Start up the development website, then install the module using the package that you have. Then, yo
Best Practices for Modifying a Custom Module by schilders
Good Morning, I'm needing to modify a custom built module created by another developer targeted f
RE: Admin menu problem by alireza arabiyan
hi in localhost i have http://localhost/senf/خانه.aspx and http://localhost/senf/Admi
RE: Admin menu problem by Joseph Craig
Yes, that is what you should have done. What is the URL for your home page? What is the URL for
RE: Admin menu problem by alireza arabiyan
hi first in localhost i add my domain.com as portal alias. then copy all files to host , restore my
RE: Admin menu problem by Joseph Craig
How did you move it? Have you added an entry in the portalalias table for the site's domain name?
RE: Re: SQL SERVER 2008 R2 Remote connection by Joseph Craig
Set up a user with dbo privileges and set the connection string for that user, rather than using Win
Re: SQL SERVER 2008 R2 Remote connection by Prakasam Srinivasan
I have successfully configured MSSQL Server 2008 r2 remote connection. I am using windows 7 and it h
Admin menu problem by alireza arabiyan
hi i installed dnn 6 on localhost and move it in my host, all link's , pages and modules are ok,
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config procedure
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config
dnn 4.4 upgrade issue by imran shaikh
hi this is imran i am upgrading dnn 4.4 to dnn 6.0.2 and getting this error please help me for this
RE: How to build Skins for DNN 6.x by Joseph Craig
I'd recommend that you try replacing the hard-coded text with the DotNetNuke Text skin object. That
RE: Module permission does not work! by Joseph Craig
What permissions have you give to that role?
RE: DNN nav issue by Joseph Craig
Are you using a custom skin? How often does this happen?
RE: Friendly URLs Broken by Joseph Craig
I don't entirely understand this, but I'm glad you got things working.
RE: How to build Skins for DNN 6.x by Christopher Adamakis
Dear all, I have one more question regarding greek fonts. If you check my site http://www.expertsoft
RE: Dnn local setup problem by imran shaikh
this is error is resolve now now getting this one Server Error in '/cooperpharma.ma' Applicat
RE: Module permission does not work! by Abraham Tameru
I created a special role for the user to administer the site. The user is not a member of the Admini
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds