97久久国产亚洲精品超碰热,成人又色又爽的免费网站,色偷偷女人的天堂a,男女高潮喷水在线观看,国内精品一线二线三线区别在哪里

Discuz! 官方交流社區(qū)

標(biāo)題: DiscuzX3.4 徹底解決后臺修改用戶名前臺還是舊名稱的辦法 [打印本頁]

作者: dazhu    時間: 2019-10-25 12:39
標(biāo)題: DiscuzX3.4 徹底解決后臺修改用戶名前臺還是舊名稱的辦法
本帖最后由 dazhu 于 2019-10-25 12:52 編輯

第一種方法:UC后臺編輯用戶,修改用戶名。這樣如果“通信成功”且“通知成功”的話,新用戶名可以登錄,但是群組的用戶與帖子的作者與最后更新還是舊用戶名。此方法能用不是太完美。

第二種方法:直接操作數(shù)據(jù),此方法效果較好,需要一定的數(shù)據(jù)庫操作技術(shù)。后臺開啟允許執(zhí)行數(shù)據(jù)庫,用下面語句執(zhí)行下,大概需要的語句有
  1. update `pre_common_member` set `username`=REPLACE(`username`, '原名', '新名');
  2. update `pre_ucenter_members` set `username`=REPLACE(`username`, '原名', '新名');
  3. update `pre_forum_groupuser` set `username`=REPLACE(`username`, '原名', '新名');
  4. update `pre_forum_post` set `author`=REPLACE(`author`, '原名', '新名');
  5. update `pre_forum_thread` set `author`=REPLACE(`author`, '原名', '新名');
  6. update `pre_forum_thread` set `lastposter`=REPLACE(`lastposter`, '原名', '新名');
  7. update `pre_home_feed` set `username`=REPLACE(`username`, '原名', '新名');
復(fù)制代碼

此方法已經(jīng)很完美了,但不排除數(shù)據(jù)庫含用戶名的表全部都在,如果發(fā)現(xiàn)還有表含有用戶名的改下表名稱加進去,注意區(qū)分username,authorlastposter即可

注:此方法discuzx通用
作者: zhsyn    時間: 2020-1-9 15:02
謝謝分享




歡迎光臨 Discuz! 官方交流社區(qū) (http://r615.cn/) Powered by Discuz! X5.0