Is there a way to lock down the info on a User Page so that only the user can change it? Anyone wanting to pass a message to the user can put it on their Talk page. I'd like to make the User Page pretty much a Resume / CV controlled by the user alone.
Bill Taylor
Maybe with a hook to the userCan event.
Fernando Correia a écrit :
Maybe with a hook to the userCan event.
<usual disclaimer about using mediawiki for what it was not intended for, whatever it is>
same thing but in Localsettings.php add this :
# Set userCan hook $wgHooks['userCan'][] = 'wfSetEditRestrictions';
# Edit restrictions function wfSetEditRestrictions( &$title, &$user, $action, &$result ) {
if( $action != 'edit' ) { return; }
if ( $title->mNamespace === NS_USER){ if ($user->getName() === $title->getText()) { $result = true; } else { $result = false; } } }
</usual disclaimer>
Bill Taylor a écrit :
Is there a way to lock down the info on a User Page so that only the user can change it? Anyone wanting to pass a message to the user can put it on their Talk page. I'd like to make the User Page pretty much a Resume / CV controlled by the user alone.
<usual disclaimer about using mediawiki for what it was not intended for, whatever it is>
I know that someone is going to scream at me and there are "chances" (certitude) that it's not secure but you can try :
open includes/Title.php --> function userCan($action) {...}
just after : global $wgUser;
insert :
if ( $action === 'edit' && $this->mNamespace === NS_USER){ if ($wgUser->getName() === $this->getText()) { return true; } else { return false; } }
</usual disclaimer>
mediawiki-l@lists.wikimedia.org