开发者

Delete or disable user in mediawiki

How can i disable or delete an user in mediawiki? I can delete th开发者_StackOverflow中文版e records from the db but i am not sure if this would affect anything else in the wiki. Any suggestions would be welcome

Thanks Prady


1. This solutions is available out of the box for MediaWiki 1.16+

The user and all the contributed content will remain but they will not be able to log in any more.

There are two steps that need to be done:

  • First block the user using the link in Special Pages.
    • Blocking can be performed against user id or IP address to prevent them from editing the wiki.
    • They will still be able to log in and view content.
  • Then in LocalSettings.php add $wgBlockDisablesLogin=true; ($wgBlockDisablesLogin).
    • Now upon logging in the user will be greeted with Login error. This user is blocked. Login not allowed..

2. This solutions requires an extension that works with MediaWiki 1.29+

If you want to completely remove access to a user, e.g. on a simple private wiki, it's not possible to simply delete the account (unless no edits have been made); you can block it, but the user will still be able to read pages. However, using User Merge and Delete extension you can merge the account in another one and delete the former; the original account will then "disappear".

Also:

If you want to preserve history readability (i.e., to have edits from the user to be still shown under his name), you can create a new account e.g. with username "OriginalUserName (deactivated)" and then merge "OriginalUserName" into the former, or even use Renameuser extension.

I suppose if you wanted to revive the user later on you would need to repeat this process but this time you would merge OriginalUserName (deactivated) into OriginalUserName.

See Preventing Access page in the MediaWiki manual.


There's a special page that Admin users can see, /Special:BlockIP. Block them there.

You can also get to it from the Special Pages page, /Special:SpecialPages.


you could also reset the password of the user via

  • /Special:PasswordReset

note: I would not recommend deleting data via scripts in the DB. there are various functionalities for rolling back unwanted user edits, merging contribution from one user to another, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜