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.

Note: MediaWiki version 1.11 underwent significant coding changes to the core code, which rendered version 1.0 of this extension obsolete. Version 2.0 has been rewritten to function with MediaWiki version 1.11+.

Installation
Save the code below in your extensions folder of your MediaWiki installation as UserPageEditProtection.php. Add the following to your LocalSettings.php file:

MediaWiki versions 1.6 through 1.10
For MediaWiki versions 1.6 through 1.10, copy the following code and save as "extensions/UserPageEditProtection.php":

MediaWiki version 1.11+
For MediaWiki version 1.11+, copy the following code and save as "extensions/UserPageEditProtection.php":

Note: If you have problems accessing your site after making this change, look in the HTTPD error log for an error message about this extension. > tail /etc/httpd/logs/error_log. If you see "Failed opening required 'extensions/UserPageEditProtection/UserPageEditProtection.php", create a extensions/UserPageEditProtection/ directory and move UserPageEditProtection.php to extensions/UserPageEditProtection/UserPageEditProtection.php:

MediaWiki Versions

 * Version 1.0 of this extension has been tested and works fine on MediaWiki versions 1.6.x, 1.7.x, 1.8.x, 1.9.x and 1.10.x.
 * Version 2.0 of this extension has been tested and works fine on MediaWiki version 1.11.x, 1.12.x, 1.13.x, 1.14.x and 1.15.x.