}
// 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',