Merge "Protected function UploadBase->validateName changed to public"
[lhc/web/wiklou.git] / includes / User.php
index 9427a9e..0ac79d6 100644 (file)
@@ -921,22 +921,12 @@ class User {
         * @return Bool True if the user is logged in, false otherwise.
         */
        private function loadFromSession() {
-               global $wgExternalAuthType, $wgAutocreatePolicy;
-
                $result = null;
                wfRunHooks( 'UserLoadFromSession', array( $this, &$result ) );
                if ( $result !== null ) {
                        return $result;
                }
 
-               if ( $wgExternalAuthType && $wgAutocreatePolicy == 'view' ) {
-                       $extUser = ExternalUser::newFromCookie();
-                       if ( $extUser ) {
-                               # TODO: Automatically create the user here (or probably a bit
-                               # lower down, in fact)
-                       }
-               }
-
                $request = $this->getRequest();
 
                $cookieId = $request->getCookie( 'UserID' );
@@ -4409,8 +4399,6 @@ class User {
         * @todo document
         */
        protected function saveOptions() {
-               global $wgAllowPrefChange;
-
                $this->loadOptions();
 
                // Not using getOptions(), to keep hidden preferences in database
@@ -4422,7 +4410,6 @@ class User {
                        return;
                }
 
-               $extuser = ExternalUser::newFromUser( $this );
                $userId = $this->getId();
                $insert_rows = array();
                foreach( $saveOptions as $key => $value ) {
@@ -4437,16 +4424,6 @@ class User {
                                                'up_value' => $value,
                                        );
                        }
-                       if ( $extuser && isset( $wgAllowPrefChange[$key] ) ) {
-                               switch ( $wgAllowPrefChange[$key] ) {
-                                       case 'local':
-                                       case 'message':
-                                               break;
-                                       case 'semiglobal':
-                                       case 'global':
-                                               $extuser->setPref( $key, $value );
-                               }
-                       }
                }
 
                $dbw = wfGetDB( DB_MASTER );