Mediawiki 海量用户删除/合并/阻止 [英] Mediawiki mass user delete/merge/block
问题描述
我的 wiki 上有 500 个左右的垃圾邮件机器人和大约 5 个实际注册用户.我已经使用 nuke 删除了他们的页面,但他们只是不断地重新发布.我使用 reCaptcha 控制了垃圾邮件机器人的注册.现在,我只需要一种方法来一次删除/阻止/合并大约 500 个用户.
I have 500 or so spambots and about 5 actual registered users on my wiki. I have used nuke to delete their pages but they just keep reposting. I have spambot registration under control using reCaptcha. Now, I just need a way to delete/block/merge about 500 users at once.
推荐答案
您可以手动从 user
表中删除帐户,或者至少使用以下查询禁用其身份验证信息:
You could just delete the accounts from the user
table manually, or at least disable their authentication info with a query such as:
UPDATE /*_*/user SET
user_password = '',
user_newpassword = '',
user_email = '',
user_token = ''
WHERE
/* condition to select the users you want to nuke */
(将 /*_*/
替换为您的 $wgDBprefix
,如果有的话.哦,先做个备份.)
(Replace /*_*/
with your $wgDBprefix
, if any. Oh, and do make a backup first.)
清除 user_password
和 user_newpassword
字段可防止用户登录.同时清除 user_email
可防止他们通过以下方式请求新密码电子邮件,并清除 user_token
会丢弃他们可能拥有的任何活动会话.
Wiping out the user_password
and user_newpassword
fields prevents the user from logging in. Also wiping out user_email
prevents them from requesting a new password via email, and wiping out user_token
drops any active sessions they may have.
更新:自从我第一次发布这篇文章以来,我在清理 MediaWiki 安装中的大量垃圾邮件用户和内容方面有了进一步的经验.我已经在 网站管理员 Stack Exchange 上的这个答案.
Update: Since I first posted this, I've had further experience of cleaning up large numbers of spam users and content from a MediaWiki installation. I've documented the method I used (which basically involves first deleting the users from the database, then wiping out up all the now-orphaned revisions, and finally running rebuildall.php to fix the link tables) in this answer on Webmasters Stack Exchange.
或者,您可能还会发现 Extension:RegexBlock 很有用:
Alternatively, you might also find Extension:RegexBlock useful:
RegexBlock 是一个扩展,它添加了一个特殊页面,带有使用正则表达式阻止、查看和取消阻止用户名和 IP 地址的界面."
"RegexBlock is an extension that adds special page with the interface for blocking, viewing and unblocking user names and IP addresses using regular expressions."
这篇关于Mediawiki 海量用户删除/合并/阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!