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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationRemove/Hide the domain prefix from logon?Remove/Hide the domain prefix from logon?
Previous
 
Next
New Post
4/24/2008 1:00 PM
 

AJ.    Until there is an answer to my post above you should use this script in your login.ascx file.  Change the "domain".  It is not as flexible as Tom's but it works for me.

<script runat="server">  
Sub change(sender As Object, e As EventArgs)
if txtUsername.Text="admin" then
 txtUsername.Text="admin"
elseif txtUsername.Text="host" then
 txtUsername.Text="host"
else txtUsername.Text="domain\" & txtUsername.Text
end if
end sub 
</script>

 
New Post
4/24/2008 1:29 PM
 

Tom's script looks fine to me and it looks like a direct copy of the script from this post http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/89/threadid/60815/scope/posts/Default.aspx which is the exact script I use on our production site at work.

There's nothing wrong with the script you're using except that, like you said, it isn't as flexible. AJ if you want send me an email (mhorton@telus.net) and we'll arrange for me to look at your login.ascx or for me to send you mine.

 
New Post
4/24/2008 2:44 PM
 

Ok I did further testing and used the first example posted by Chis Wood from this thread and it works just fine.
http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/89/threadid/60815/scope/posts/Default.aspx 

Then I used Tom's changes and it does not work.
txtUsername.Text = String.Format("{0}@somedomain.com", txtUsername.Text)

There must be something different about our domain setups where I cannot use the email ID for logons.

 
New Post
4/28/2008 1:16 PM
 

MO,

Your are 100% correct I use the script in the link http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/89/threadid/60815/scope/posts/Default.aspx and it work just fine without any issues. Thank you and Mike for the reply and solution. Now to figure out the sync role issue.

 
New Post
10/4/2013 6:06 PM
 

Hello,

I'm trying to use this script on DNN 7 and it seems that the login.ascx  file is different, I modified the code as following:

<script runat="server">
Sub change(ByVal sender As Object, ByVal e As EventArgs)
 Select Case txtUsername.Text
 Case "admin"
 Case "host"
 Case Else
    If txtUsername.Text.StartsWith("somedomain\") Then
        'The user added the wrong somedomain information
        If txtUsername.Text.Contains("somedomain\") Then
            txtUsername.Text = txtUsername.Text.Replace("somedomain\", "")
        End If
        txtUsername.Text = String.Format("somedomain\{0}", txtUsername.Text)
    Else
        'The user didn't enter the somedomain so add it for them
        if txtUsername.Text.EndsWith("@somedomain.com") then
        else
            txtUsername.Text = String.Format("somedomain\{0}", txtUsername.Text)
        End if
    End If
 End Select
End Sub
</script>

<div class="dnnForm dnnLoginService dnnClear">
    <div class="dnnFormItem">
        <asp:label id="plUsername" AssociatedControlID="txtUsername" ontextchanged="change" runat="server" resourcekey="Username" CssClass="dnnFormLabel" />
        <asp:textbox id="txtUsername" runat="server" />
    </div>
    <div class="dnnFormItem">
        <asp:label id="plPassword" AssociatedControlID="txtPassword" runat="server" resourcekey="Password" CssClass="dnnFormLabel" />
        <asp:textbox id="txtPassword" textmode="Password" runat="server" />
    </div>
    <div class="dnnFormItem" id="divCaptcha1" runat="server" visible="false">
        <asp:label id="plCaptcha" AssociatedControlID="ctlCaptcha" runat="server" resourcekey="Captcha" CssClass="dnnFormLabel" />
    </div>
    <div class="dnnFormItem" id="divCaptcha2" runat="server" visible="false">
        <dnn:captchacontrol id="ctlCaptcha" captchawidth="130" captchaheight="40" runat="server" errorstyle-cssclass="dnnFormMessage dnnFormError" />
    </div>
    <p><asp:LinkButton id="cmdLogin" resourcekey="cmdLogin" cssclass="dnnPrimaryAction" text="Login" runat="server" /></p>
</div>

I don't get any errors, but it simply does not do nothing, if I use the username minux the domain prefix I just just get the wrong username/password error, If I add the somedomain\ prefix it works.

 Is there something that needs to be done differently on this version?

Thanks in advance for any help.

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationRemove/Hide the domain prefix from logon?Remove/Hide the domain prefix from logon?


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