diff --git a/switchtheme.info b/switchtheme.info
index f70e4b3..9afa914 100644
--- a/switchtheme.info
+++ b/switchtheme.info
@@ -1,5 +1,5 @@
 name = Switchtheme
 description = Allows switching the theme in various means.
-core = 7.x
+core = 8.x
 package = User interface
 configure = admin/config/user-interface/switchtheme
diff --git a/switchtheme.module b/switchtheme.module
index 3248889..e50eea8 100644
--- a/switchtheme.module
+++ b/switchtheme.module
@@ -266,9 +266,8 @@ function switchtheme_switch_form_submit($form, &$form_state) {
   // permission has been granted.
   if ($user->uid > 0 && user_access('select different theme')) {
     $account = user_load($user->uid);
-    user_save($account, array(
-      'theme' => $form_state['values']['theme'],
-    ));
+    $account->theme = $form_state['values']['theme'];
+    $account->save();
   }
   // Otherwise save the setting in the user's session.
   elseif (user_access('switch theme')) {
