Discuz!NT 在线显示列表 游客 bug 修复

引发bug的条件:当你修改了系统组里面的[游客]组 的名字后!!

你会发现首页上底部的在线显示列表里始终都是显示"游客"字样而非你改过得字样!如图

至此你需要运行一个t-sql脚本去修复这个bug!(但是本人不建议修改论坛源代码的方式去修复这个bug!)

fix bug:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[dnt_getonlineuserlist]
AS
SELECT [olid]
      ,[userid]
      ,[ip]
      ,REPLACE([username], N'游客', (select top 1 grouptitle from dbo.dnt_usergroups where groupid = 7)) as [username]--,[username]
      ,REPLACE([nickname], N'游客', (select top 1 grouptitle from dbo.dnt_usergroups where groupid = 7)) as [nickname]--,[nickname]
      ,[password]
      ,[groupid]
      ,[olimg]
      ,[adminid]
      ,[invisible]
      ,[action]
      ,[lastactivity]
      ,[lastposttime]
      ,[lastpostpmtime]
      ,[lastsearchtime]
      ,[lastupdatetime]
      ,[forumid]
      ,[forumname]
      ,[titleid]
      ,[title]
      ,[verifycode]
      ,[newpms]
      ,[newnotices] FROM [dnt_online]
GO

SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO

  这里的groupid = 7的数字7就是游客组的主键~~如果你那边不是的话请自行替换~~

适用版本:Discuz!NT 3.6.711 (已测试通过)

效果图:

感言:我去TMD的开源论坛!

本文到此结束!谢谢.

原文地址:https://www.cnblogs.com/highend/p/2606499.html