DNN探索之路二:如何取消DNN中Host这种超级用户
在DNN中在取消Host这种Super User用户的过程中,对DNN代码主要做了两处修改:
1)在Configuration.vb文件中的 PortalSettings 类里的 GetPortalSettings 方法里,把
Me.SuperUserId = Convert.ToInt32(dt.Rows(0).Item("SuperUserId"))
这句话改成:
Me.SuperUserId = -1
2)在components下的Security.vb 文件里的 PortalSecurity 类中 UserLogin 方法中,把
dr = DataProvider.Instance().GetPortal(PortalID)
If dr.Read Then
SuperUserId = Convert.ToInt32(dr("SuperUserId"))
End If
dr.Close()
注释掉
1)在Configuration.vb文件中的 PortalSettings 类里的 GetPortalSettings 方法里,把
Me.SuperUserId = Convert.ToInt32(dt.Rows(0).Item("SuperUserId"))
这句话改成:
Me.SuperUserId = -1
2)在components下的Security.vb 文件里的 PortalSecurity 类中 UserLogin 方法中,把
dr = DataProvider.Instance().GetPortal(PortalID)
If dr.Read Then
SuperUserId = Convert.ToInt32(dr("SuperUserId"))
End If
dr.Close()
注释掉
浙公网安备 33010602011771号