Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Disable the Login \Register Disable the Login \Register
Previous
 
Next
New Post
2/17/2012 2:03 AM
 

Hi every one..,

Iam using dotnetnuke to develop my site. i created my own custom module in login and register . In the every page the Portal login and register link will be display. its confuse the my client. how  can i do invisible for that login and register link, ..  can you help me.........

Thanks in Advance.............

 
New Post
2/17/2012 9:19 AM
 

Under Admin, Site Settings, Advanced Settings

you will find you can specify a new page to replace the standard login page. You can also specify a different page for displaying the user profile and another to replace the registration page.

Create the pages you want, configure accordingly and the links at the top right of the screen will go to the pages you have created.

 
New Post
2/18/2012 6:56 AM
 

If I understand you correctly you want to remove just the two links. You can do that through your ascx skin file by removing these two lines

<dnn:user runat="server" id="dnnUSER" cssclass="user" />
<dnn:login runat="server" id="dnnLOGIN" cssclass="login" />

Or if you want to remove Login and Register, but want to keep <ProfileName> and Logout you can do this

<% if (Request.IsAuthenticated) {%>
    <dnn:user runat="server" id="dnnUSER" cssclass="user" />
    <dnn:login runat="server" id="dnnLOGIN" cssclass="login" />
<% }%>

 
New Post
4/25/2012 8:56 AM
 
Go to "DesktopModules\Admin\Authentication\Login.ascx.cs" and add Response.Redirect("~/default.aspx"); inside "protected override void OnInit(EventArgs e)",

it will redirect to home page and client won't be able to see this login page.

sample:
protected override void OnInit(EventArgs e)
{
Response.Redirect("~/default.aspx");
.........
............
}



Thanking you
Ishwor
 
New Post
4/25/2012 9:05 AM
 

open your project file "\DesktopModules\Admin\Authentication\Login.ascx.cs",

then add  ===Response.Redirect("~/default.aspx"); ==  inside ==OnInit(EventArgs e) == function,

this will redirect when your client come come to login page.

sample code :

protected override void OnInit(EventArgs e)
        {
            Response.Redirect("~/default.aspx");
            base.OnInit(e);

            ctlPassword.PasswordUpdated += PasswordUpdated;
            ctlProfile.ProfileUpdated += ProfileUpdated;
            ctlUser.UserCreateCompleted += UserCreateCompleted;

            //Set the User Control Properties
            ctlUser.ID = "User";

            //Set the Profile Control Properties
            ctlPassword.ID = "Password";

            //Set the Profile Control Properties
            ctlProfile.ID = "Profile";

            //Override the redirected page title if page has loaded with ctl=Login
            if (Request.QueryString["ctl"] != null)
            {
                if (Request.QueryString["ctl"].ToLower() == "login")
                {
                    var myPage = (CDefault) Page;
                    if (myPage.PortalSettings.LoginTabId == TabId || myPage.PortalSettings.LoginTabId == -1)
                    {
                        myPage.Title = Localization.GetString("ControlTitle_login", LocalResourceFile);
                    }
                }
            }
        }

 

and if you want to disable login and register link go to "\DesktopModules\Admin\Authentication\Login.ascx"

and disable following links

============

<ul class="dnnActions dnnClear">
                    <li id="liRegister" runat="server"><asp:HyperLink ID="registerLink" runat="server" CssClass="dnnSecondaryAction" resourcekey="cmdRegister" /></li>                
                    <li id="liPassword" runat="server"><asp:HyperLink ID="passwordLink" runat="server" CssClass="dnnSecondaryAction" resourcekey="cmdPassword" /></li>
                </ul> 

 

thanking you

Regards

ishwor

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Disable the Login \Register Disable the Login \Register


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out