Merge "Revert "Prevent new users from being sent emails""
[lhc/web/wiklou.git] / includes / user / User.php
index 0d8ef89..7684d2e 100644 (file)
@@ -179,7 +179,6 @@ class User implements IDBAccessObject, UserIdentity {
                'reupload-shared',
                'rollback',
                'sendemail',
-               'sendemail-new-users',
                'siteadmin',
                'suppressionlog',
                'suppressredirect',
@@ -3089,12 +3088,13 @@ class User implements IDBAccessObject, UserIdentity {
                        $options = $this->mOptions;
                }
 
-               $prefs = Preferences::getPreferences( $this, $context );
+               $preferencesFactory = MediaWikiServices::getInstance()->getPreferencesFactory();
+               $prefs = $preferencesFactory->getFormDescriptor( $this, $context );
                $mapping = [];
 
                // Pull out the "special" options, so they don't get converted as
                // multiselect or checkmatrix.
-               $specialOptions = array_fill_keys( Preferences::getSaveBlacklist(), true );
+               $specialOptions = array_fill_keys( $preferencesFactory->getSaveBlacklist(), true );
                foreach ( $specialOptions as $name => $value ) {
                        unset( $prefs[$name] );
                }
@@ -4583,7 +4583,7 @@ class User implements IDBAccessObject, UserIdentity {
         * (T8957 with Gmail and Internet Explorer).
         *
         * @param string $page Special page
-        * @param string $token Token
+        * @param string $token
         * @return string Formatted URL
         */
        protected function getTokenUrl( $page, $token ) {