Fix retarded mistake in 57997, move break to within the if block or it defeats the...
[lhc/web/wiklou.git] / includes / AuthPlugin.php
index b29e13f..eacabd4 100644 (file)
@@ -63,8 +63,9 @@ class AuthPlugin {
         * 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 );
        }
@@ -122,6 +123,25 @@ class AuthPlugin {
                return false;
        }
 
+       /**
+        * 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 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 passwords?
         *