Extension:UserPageEditProtection

What can this extension do?
This extension will restrict edit access to user pages to the owner of the page (user) and users assigned to groups that have been given user page edit access through $wgGroupPermissions. This effectively provides users with a group of protected pages since this protection also extends to any subpages of the user page (i.e., User:Hoggwild/sandbox1). The User pages can be read by any user assigned to a group with view rights to user pages, but can only be edited by authorized users.

This extension has no effect on user talk pages.

Sysops should probably be provided the ability to edit all user pages to remove user page content that violates the provisions of the wiki. Other user groups can be provided the ability to edit user pages by assigning permission through $wgGroupPermissions as well.

Installation
Save the code below in your extensions folder of your MediaWiki installation as UserPageEditProtection.php. Add the following to LocalSettings.php:
 * $wgOnlyUserEditUserPage = true; /**< Set this to true to turn on user page protection */
 * $wgGroupPermissions['sysop']['editalluserpages'] = true; /**< Set this to allow sysops to edit all user pages */
 * require_once('extensions/UserPageEditProtection.php'); /**< Add this to activate the extension */

Changes to LocalSettings.php
Add the following to your LocalSettings.php file:

Code
'''Copy the following code and save as "extensions/UserPageEditProtection.php":

MediaWiki Versions
This extension has been tested and appears to work fine on MediaWiki versions 1.6.10, 1.7.3, 1.8.4, 1.9.3 and 1.10.0. Once the extension has been fully tested (probably over the next 30 days) this page will be updated and the extension will be released as a stable version.