diff --git a/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php b/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php index 38d184e4c05..9f986abbc18 100644 --- a/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php +++ b/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php @@ -49,7 +49,6 @@ class TextPlainUnitTest extends DrupalUnitTestBase { // Configure the theme system. $this->installConfig(array('system', 'field')); $this->installSchema('entity_test', 'entity_test'); - $this->installSchema('user', 'users'); // @todo Add helper methods for all of the following. diff --git a/core/modules/user/lib/Drupal/user/Entity/User.php b/core/modules/user/lib/Drupal/user/Entity/User.php index 80fc18ad7f8..35af76a8b11 100644 --- a/core/modules/user/lib/Drupal/user/Entity/User.php +++ b/core/modules/user/lib/Drupal/user/Entity/User.php @@ -266,13 +266,6 @@ class User extends ContentEntityBase implements UserInterface { return $this; } - /** - * {@inheritdoc} - */ - public function getDefaultTheme() { - return $this->get('theme')->value; - } - /** * {@inheritdoc} */ @@ -482,11 +475,6 @@ class User extends ContentEntityBase implements UserInterface { ->setLabel(t('Signature format')) ->setDescription(t('The signature format of this user.')); - $fields['theme'] = FieldDefinition::create('string') - ->setLabel(t('Theme')) - ->setDescription(t('The default theme of this user.')) - ->setPropertyConstraints('value', array('Length' => array('max' => DRUPAL_EXTENSION_NAME_MAX_LENGTH))); - $fields['timezone'] = FieldDefinition::create('string') ->setLabel(t('Timezone')) ->setDescription(t('The timezone of this user.')) diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php index a164da94968..8b6bb8c7176 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php @@ -182,7 +182,6 @@ class UserRegistrationTest extends WebTestBase { $new_user = reset($accounts); $this->assertEqual($new_user->getUsername(), $name, 'Username matches.'); $this->assertEqual($new_user->getEmail(), $mail, 'E-mail address matches.'); - $this->assertEqual($new_user->theme->value, '', 'Correct theme field.'); $this->assertEqual($new_user->getSignature(), '', 'Correct signature field.'); $this->assertTrue(($new_user->getCreatedTime() > REQUEST_TIME - 20 ), 'Correct creation time.'); $this->assertEqual($new_user->isActive(), $config_user_settings->get('register') == USER_REGISTER_VISITORS ? 1 : 0, 'Correct status field.'); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php index 642120f2d78..cf68623ee77 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php @@ -125,10 +125,6 @@ class UserValidationTest extends DrupalUnitTestBase { $this->assertLengthViolation($user, 'signature', 255); $user->set('signature', NULL); - $user->set('theme', $this->randomString(DRUPAL_EXTENSION_NAME_MAX_LENGTH + 1)); - $this->assertLengthViolation($user, 'theme', DRUPAL_EXTENSION_NAME_MAX_LENGTH); - $user->set('theme', NULL); - $user->set('timezone', $this->randomString(33)); $this->assertLengthViolation($user, 'timezone', 32); $user->set('timezone', NULL); diff --git a/core/modules/user/lib/Drupal/user/Theme/UserNegotiator.php b/core/modules/user/lib/Drupal/user/Theme/UserNegotiator.php deleted file mode 100644 index f601acf6ca1..00000000000 --- a/core/modules/user/lib/Drupal/user/Theme/UserNegotiator.php +++ /dev/null @@ -1,68 +0,0 @@ -userStorageController = $entity_manager->getStorageController('user'); - $this->currentUser = $current_user; - } - - /** - * {@inheritdoc} - */ - public function applies(Request $request) { - return TRUE; - } - - /** - * {@inheritdoc} - */ - public function determineActiveTheme(Request $request) { - if ($user = $this->userStorageController->load($this->currentUser->id())) {; - // Only select the user selected theme if it is available in the - // list of themes that can be accessed. - if (!empty($user->theme) && drupal_theme_access($user->theme)) { - return $user->theme; - } - } - } - -} diff --git a/core/modules/user/lib/Drupal/user/UserInterface.php b/core/modules/user/lib/Drupal/user/UserInterface.php index e2474bc8229..4022179e8c1 100644 --- a/core/modules/user/lib/Drupal/user/UserInterface.php +++ b/core/modules/user/lib/Drupal/user/UserInterface.php @@ -83,14 +83,6 @@ interface UserInterface extends ContentEntityInterface, AccountInterface { */ public function setEmail($mail); - /** - * Returns the default theme of the user. - * - * @return string - * Name of the theme. - */ - public function getDefaultTheme(); - /** * Returns the user signature. * diff --git a/core/modules/user/user.install b/core/modules/user/user.install index 67c9fcca438..a194b00762a 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -58,13 +58,6 @@ function user_schema() { 'default' => '', 'description' => "User's e-mail address.", ), - 'theme' => array( - 'type' => 'varchar', - 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, - 'not null' => TRUE, - 'default' => '', - 'description' => "User's default theme.", - ), 'signature' => array( 'type' => 'varchar', 'length' => 255, @@ -998,16 +991,6 @@ function user_update_8019() { db_change_field('users_data', 'module', 'module', $spec); } - if (db_field_exists('users', 'theme')) { - $spec = array( - 'type' => 'varchar', - 'length' => 50, - 'not null' => TRUE, - 'default' => '', - 'description' => "User's default theme.", - ); - db_change_field('users', 'theme', 'theme', $spec); - } } /** diff --git a/core/modules/user/user.services.yml b/core/modules/user/user.services.yml index 05382aff7aa..d255dfdba56 100644 --- a/core/modules/user/user.services.yml +++ b/core/modules/user/user.services.yml @@ -25,11 +25,6 @@ services: class: Drupal\user\EventSubscriber\MaintenanceModeSubscriber tags: - { name: event_subscriber } - theme.negotiator.user: - class: Drupal\user\Theme\UserNegotiator - arguments: ['@entity.manager', '@current_user'] - tags: - - { name: theme_negotiator, priority: -50 } theme.negotiator.admin_theme: class: Drupal\user\Theme\AdminNegotiator arguments: ['@current_user', '@config.factory', '@entity.manager'] diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php index 897bfd923de..87732485d45 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldCounterTest.php @@ -19,7 +19,7 @@ class FieldCounterTest extends ViewUnitTestBase { * * @var array */ - public static $modules = array('user', 'field'); + public static $modules = array('user'); /** * Views used by this test. @@ -36,12 +36,6 @@ class FieldCounterTest extends ViewUnitTestBase { ); } - protected function setUp() { - parent::setUp(); - - $this->installSchema('user', 'users'); - } - function testSimple() { $view = views_get_view('test_view'); $view->setDisplay(); diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php index affd9bdc526..6ad3b19a4d7 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php @@ -17,7 +17,7 @@ use Drupal\views\Plugin\views\field\FieldPluginBase; */ class FieldUnitTest extends ViewUnitTestBase { - public static $modules = array('user', 'field'); + public static $modules = array('user'); /** * Views used by this test. @@ -38,12 +38,6 @@ class FieldUnitTest extends ViewUnitTestBase { ); } - protected function setUp() { - parent::setUp(); - - $this->installSchema('user', 'users'); - } - /** * Overrides Drupal\views\Tests\ViewTestBase::viewsData(). */ diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php index 32c3bfc8659..b0d830b6ec7 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php @@ -59,7 +59,6 @@ class DisplayPageTest extends ViewUnitTestBase { // Setup the needed tables in order to make the drupal router working. $this->installSchema('system', array('router', 'menu_router', 'url_alias')); $this->installSchema('menu_link', 'menu_links'); - $this->installSchema('user', 'users'); } /**