俺的回收站

架构分析 解释编译原理
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

[DNN 4.4.0] 修改登录控件

Posted on 2007-02-09 10:08  Riceball LEE  阅读(513)  评论(0编辑  收藏  举报
[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
  .....