Jump to content

User:Jasper Deng/Account locking

From mediawiki.org

The following is an unofficial setting that can effectively lock a user account, making use of $wgRevokePermissions. Add these to your LocalSettings.php:

#The first four lines revoke essential permissions for locked users
$wgRevokePermissions['locked']['read']=true; #Revoke the ability to read any pages
$wgRevokePermissions['locked']['createaccount']=true; #Account creation blocked
$wgRevokePermissions['locked']['edit']=true; #Cannot edit
$wgRevokePermissions['locked']['sendemail']=true; #E-mail blocked
$wgAddGroups['sysop']=array('locked'); # This and the next line are to allow sysops to make the locks/unlocks
$wgRemoveGroups['sysop']=array('locked'); # Include other groups as necessary

This allows sysops and bureaucrats to effectively lock an account by assigning the 'locked' userright to the offending account.