* (bug 18242) Show the Subversion revision number per extensions in
Special:Version
* (bug 18420) Missing file revisions are handled gracefully now
+* (bug 9219) Auth plugins can control editing RealName/Email/Nick preferences
=== Bug fixes in 1.15 ===
* (bug 16968) Special:Upload no longer throws useless warnings.
public function allowPasswordChange() {
return true;
}
+
+ /**
+ * Can users change their Real Name?
+ *
+ * @return bool
+ */
+ public function allowRealNameChange() {
+ return false;
+ }
+
+ /**
+ * Can users change their email address?
+ *
+ * @return bool
+ */
+ public function allowEmailChange() {
+ return false;
+ }
+
+ /**
+ * Can users change their Nickname?
+ *
+ * @return bool
+ */
+ public function allowNickChange() {
+ return false;
+ }
/**
* Set the given password in the authentication database.
}
// Actually changeable stuff
- global $wgAllowRealName;
+ global $wgAllowRealName, $wgAuth;
if ($wgAllowRealName) {
$defaultPreferences['realname'] =
array(
- 'type' => 'text',
+ 'type' => $wgAuth->allowRealNameChange() ? 'text' : 'info',
'default' => $user->getRealName(),
'section' => 'personal/info',
'label-message' => 'yourrealname',
'help-message' => 'prefs-help-gender',
);
- global $wgAuth;
if ($wgAuth->allowPasswordChange()) {
global $wgUser; // For skin.
$link = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'ResetPass' ),
global $wgMaxSigChars;
$defaultPreferences['nickname'] =
array(
- 'type' => 'text',
+ 'type' => $wgAuth->allowNickChange() ? 'text' : 'info',
'maxlength' => $wgMaxSigChars,
'label-message' => 'yournick',
'validation-callback' =>
$defaultPreferences['emailaddress'] =
array(
- 'type' => 'text',
+ 'type' => $wgAuth->allowEmailChange() ? 'text' : 'info',
'default' => $user->getEmail(),
'section' => 'personal/email',
'label-message' => 'youremail',