Skip to content

Commit

Permalink
Merge pull request #14 from sawest/master
Browse files Browse the repository at this point in the history
Updated code for 6.0.2
  • Loading branch information
sawest authored Apr 25, 2017
2 parents 75dc2ed + 2349d4f commit dc01919
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 43 deletions.
4 changes: 2 additions & 2 deletions ActiveDirectory.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DNN_ActiveDirectoryAuthentication" type="Auth_System" version="06.00.00">
<package name="DNN_ActiveDirectoryAuthentication" type="Auth_System" version="06.00.02">
<friendlyName>DNN_ActiveDirectoryAuthentication</friendlyName>
<description>The DotNetNuke Active Directory Authentication Project is an Authentication provider for DotNetNuke that uses the Windows
Active Directory authentication protocol to authenticate users.
Expand Down Expand Up @@ -33,7 +33,7 @@
<assembly>
<path>bin\Providers</path>
<name>DotNetNuke.Authentication.ActiveDirectory.dll</name>
<version>06.00.00</version>
<version>06.00.02</version>
</assembly>
<assembly>
<path>bin</path>
Expand Down
6 changes: 3 additions & 3 deletions AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Imports System.Runtime.InteropServices
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("06.00.00.22")>
' <Assembly: AssemblyVersion("06.00.02.29")>

<Assembly: AssemblyVersion("06.00.00.22")>
<Assembly: AssemblyFileVersion("06.00.00.22")>
<Assembly: AssemblyVersion("06.00.02.29")>
<Assembly: AssemblyFileVersion("06.00.02.29")>
48 changes: 30 additions & 18 deletions Login.ascx
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<%@ Control language="vb" Inherits="DotNetNuke.Authentication.ActiveDirectory.Login, DotNetNuke.Authentication.ActiveDirectory" AutoEventWireup="false" Explicit="True" Codebehind="Login.ascx.vb" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke" Namespace="DotNetNuke.UI.WebControls"%>
<%@ Control Language="vb" Inherits="DotNetNuke.Authentication.ActiveDirectory.Login, DotNetNuke.Authentication.ActiveDirectory" AutoEventWireup="false" Explicit="True" CodeBehind="Login.ascx.vb" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke" Namespace="DotNetNuke.UI.WebControls" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<div class="dnnForm dnnLoginService dnnClear">
<div class="dnnFormItem">
<asp:label id="plUsername" AssociatedControlID="txtUsername" runat="server" resourcekey="Username" CssClass="dnnFormLabel" />
<asp:textbox id="txtUsername" runat="server" />
<div class="dnnForm dnnLoginService dnnClear" style="margin-top: 15px;">
<div class="dnnFormItem">
<asp:Label ID="plUsername" AssociatedControlID="txtUsername" runat="server" resourcekey="Username" CssClass="dnnFormLabel" />
<asp:TextBox ID="txtUsername" runat="server" onkeydown="return checkEnter(event)" />
</div>
<div class="dnnFormItem">
<asp:Label ID="plPassword" AssociatedControlID="txtPassword" runat="server" resourcekey="Password" CssClass="dnnFormLabel" />
<asp:TextBox ID="txtPassword" TextMode="Password" runat="server" onkeydown="return checkEnter(event)" />
</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>
<div class="dnnFormItem">
<label class="dnnFormLabel" ></label>
<asp:LinkButton ID="cmdLogin" resourcekey="cmdLogin" CssClass="dnnPrimaryAction" Text="Login" runat="server" ClientIDMode="Static" />
</div>
</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>

<script>
function checkEnter(e) {
if (e.keyCode == 13) {
$("#cmdLogin")[0].click();
}
}
</script>
20 changes: 10 additions & 10 deletions Login.ascx.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 15 additions & 9 deletions Login.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,22 @@ Namespace DotNetNuke.Authentication.ActiveDirectory

Dim theUser As String = String.Empty
Dim strDomain As String = String.Empty

Dim userinfo As String()
If Not String.IsNullOrEmpty (txtUsername.Text) Then
If txtUsername.Text.IndexOf ("@") > - 1 Then
theUser = Left (txtUsername.Text, txtUsername.Text.IndexOf ("@"))
strDomain = Right (txtUsername.Text, Len (txtUsername.Text) - (Len (theUser) + 1)).ToUpper
If strDomain.Contains (sDefaultDomain) Then
theUser = Trim (sDefaultDomain).Replace ("\", "") & "\" & theUser
If txtUsername.Text.Contains("@") Then
userinfo = Split(txtUsername.Text, "@")
theUser = userinfo(0)
'theUser = Left(txtUsername.Text, txtUsername.Text.IndexOf("@")) ***Changed Steven A West 2-25-2017 Bug fix #12
strDomain = UCase(userinfo(1))

'***Changed Steven A West 2-25-2017 Bug fix #12
'strDomain = Right(txtUsername.Text, Len(txtUsername.Text) - (Len(theUser) + 1)).ToUpper
If strDomain.Contains(sDefaultDomain) Then
theUser = Trim(sDefaultDomain).Replace("\", "") & "\" & theUser
Else
theUser = txtUsername.Text
theUser = strDomain & "\" & theUser
End If
'****
Else
'If username doesn't contain the DOMAIN\ already and config uses Default Domain
'Then append default domain as prefix
Expand Down Expand Up @@ -258,8 +264,8 @@ Namespace DotNetNuke.Authentication.ActiveDirectory
End If
'Raise UserAuthenticated Event
Dim _
eventArgs As UserAuthenticatedEventArgs = _
New UserAuthenticatedEventArgs(objUser, txtUsername.Text, loginStatus, "Active Directory")
eventArgs As UserAuthenticatedEventArgs =
New UserAuthenticatedEventArgs(objUser, Split(UserName, "\")(1), loginStatus, "Active Directory") 'Bug fix #12 Steven A West
eventArgs.Authenticated = authenticated
eventArgs.Message = message
OnUserAuthenticated(eventArgs)
Expand Down
6 changes: 6 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@
<ul>Version 6.0.0
<li>Compatible with DNN 7, 8, and 9</i>
</ul>
<ul>Version 6.0.2
<li>Better UPN handling Issue #12</i>
</ul>
<h4>Features</h4>
<ul>Version 6.0.0
<li>Ability to sync AD thumbnail photo to profile pic in DNN portal.</li>
</ul>
<ul>Version 6.0.2
<li>Keyboard Enter elicits Login function Issue #13</li>
</ul>
<p class="Owner">
To run the provider under IIS 7.x in integrated mode two commands are needed to be run from a command prompt on the server.
<ul>
Expand Down
Binary file modified Resources.zip
Binary file not shown.
Binary file added source.tar
Binary file not shown.
Binary file added source.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.0.22
6.0.2.29

0 comments on commit dc01919

Please sign in to comment.