* Modify options in the login template.
*
* @param $template UserLoginTemplate object.
+ * @param $type String 'signup' or 'login'.
*/
- public function modifyUITemplate( &$template ) {
+ public function modifyUITemplate( &$template, &$type ) {
# Override this!
$template->set( 'usedomain', false );
}
}
/**
- * 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() {
- return true;
+ public function allowPropChange( $prop = '' ) {
+ if( $prop == 'realname' && is_callable( array( $this, 'allowRealNameChange' ) ) ) {
+ return $this->allowRealNameChange();
+ } elseif( $prop == 'emailaddress' && is_callable( array( $this, 'allowEmailChange' ) ) ) {
+ return $this->allowEmailChange();
+ } elseif( $prop == 'nickname' && is_callable( array( $this, 'allowNickChange' ) ) ) {
+ return $this->allowNickChange();
+ } else {
+ 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;
}