[DNN 4.4.1] 已经改正了这个Bug!
修改登录控件:
\Website\admin\Security\signin.ascx
登录后不再依然显示登录筐,而是代之以显示登录的用户名以及登出连接。
signin.ascx:
<%@ Register TagPrefix="dnn" TagName="user" Src="~/Admin/Skins/user.ascx" %>
....
Signin.ascx.vb:
Imports System.Collections.Specialized
Imports System.Web.Security
Imports DotNetNuke.Entities.Host
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Entities.Modules.Actions
Imports DotNetNuke.Entities.Profile
Imports DotNetNuke.Modules.Admin.Users
Imports DotNetNuke.Security.Membership
Imports DotNetNuke.Services.Localization
Imports DotNetNuke.Services.Mail
Imports DotNetNuke.UI.Skins.Controls.ModuleMessage
Imports DotNetNuke.UI.WebControls
Namespace DotNetNuke.Modules.Admin.Security
...
Private Sub ShowPanel()
' Modified by riceball
'pnlLogin.Visible = showLogin
Select Case PageNo
Case 0
If Request.IsAuthenticated = True Then
pnlLogin.Visible = False
pnlLogined.Visible = True
If HostSettings.GetHostSetting("UseFriendlyUrls") = "Y" Then
hypLogin.NavigateUrl = FriendlyUrl(PortalSettings.ActiveTab, ApplicationURL(PortalSettings.ActiveTab.TabID) & "&portalid=" & PortalSettings.PortalId.ToString, "Logoff.aspx")
Else
hypLogin.NavigateUrl = ResolveUrl("~/Admin/Security/Logoff.aspx?tabid=" & PortalSettings.ActiveTab.TabID & "&portalid=" & PortalSettings.PortalId.ToString)
End If
Else
pnlLogin.Visible = True
pnlLogined.Visible = False
If PortalSettings.UserRegistration = PortalRegistrationType.NoRegistration Then
tdRegister.Visible = False
End If
txtPassword.Attributes.Add("value", txtPassword.Text)
lblLogin.Text = Localization.GetSystemMessage(PortalSettings, "MESSAGE_LOGIN_INSTRUCTIONS")
End If
Case 1
.....
修改登录控件:
\Website\admin\Security\signin.ascx
登录后不再依然显示登录筐,而是代之以显示登录的用户名以及登出连接。
signin.ascx:
<%@ Register TagPrefix="dnn" TagName="user" Src="~/Admin/Skins/user.ascx" %>
....
Signin.ascx.vb:
Imports System.Collections.Specialized
Imports System.Web.Security
Imports DotNetNuke.Entities.Host
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Entities.Modules.Actions
Imports DotNetNuke.Entities.Profile
Imports DotNetNuke.Modules.Admin.Users
Imports DotNetNuke.Security.Membership
Imports DotNetNuke.Services.Localization
Imports DotNetNuke.Services.Mail
Imports DotNetNuke.UI.Skins.Controls.ModuleMessage
Imports DotNetNuke.UI.WebControls
Namespace DotNetNuke.Modules.Admin.Security
...
Private Sub ShowPanel()
' Modified by riceball
'pnlLogin.Visible = showLogin
Select Case PageNo
Case 0
If Request.IsAuthenticated = True Then
pnlLogin.Visible = False
pnlLogined.Visible = True
If HostSettings.GetHostSetting("UseFriendlyUrls") = "Y" Then
hypLogin.NavigateUrl = FriendlyUrl(PortalSettings.ActiveTab, ApplicationURL(PortalSettings.ActiveTab.TabID) & "&portalid=" & PortalSettings.PortalId.ToString, "Logoff.aspx")
Else
hypLogin.NavigateUrl = ResolveUrl("~/Admin/Security/Logoff.aspx?tabid=" & PortalSettings.ActiveTab.TabID & "&portalid=" & PortalSettings.PortalId.ToString)
End If
Else
pnlLogin.Visible = True
pnlLogined.Visible = False
If PortalSettings.UserRegistration = PortalRegistrationType.NoRegistration Then
tdRegister.Visible = False
End If
txtPassword.Attributes.Add("value", txtPassword.Text)
lblLogin.Text = Localization.GetSystemMessage(PortalSettings, "MESSAGE_LOGIN_INSTRUCTIONS")
End If
Case 1
.....