}
/**
- * Can users change their passwords?
- *
- * @return bool
- */
- public function allowPasswordChange() {
- return true;
- }
-
- /**
- * Can users change their Real Name?
+ * Allow a property change? Properties are the same as preferences
+ * and use the same keys. 'Realname' 'Emailaddress' and 'Nickname'
+ * all reference this.
*
* @return bool
*/
- public function allowRealNameChange() {
+ public function allowPropChange( $prop = '' ) {
return true;
}
/**
- * Can users change their email address?
- *
- * @return bool
- */
- public function allowEmailChange() {
- return true;
- }
-
- /**
- * Can users change their Nickname?
+ * Can users change their passwords?
*
* @return bool
*/
- public function allowNickChange() {
+ public function allowPasswordChange() {
return true;
}
if ($wgAllowRealName) {
$defaultPreferences['realname'] =
array(
- 'type' => $wgAuth->allowRealNameChange() ? 'text' : 'info',
+ 'type' => $wgAuth->allowPropChange( 'realname' ) ? 'text' : 'info',
'default' => $user->getRealName(),
'section' => 'personal/info',
'label-message' => 'yourrealname',
global $wgMaxSigChars;
$defaultPreferences['nickname'] =
array(
- 'type' => $wgAuth->allowNickChange() ? 'text' : 'info',
+ 'type' => $wgAuth->allowPropChange( 'nickname' ) ? 'text' : 'info',
'maxlength' => $wgMaxSigChars,
'label-message' => 'yournick',
'validation-callback' =>
$defaultPreferences['emailaddress'] =
array(
- 'type' => $wgAuth->allowEmailChange() ? 'text' : 'info',
+ 'type' => $wgAuth->allowPropChange( 'emailaddress' ) ? 'text' : 'info',
'default' => $user->getEmail(),
'section' => 'personal/email',
'label-message' => 'youremail',