From faf80cb132fbeb9ed10cdc31e9a86018ceb9dba0 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Thu, 19 Sep 2024 14:53:48 +0300 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20deal=20with=20setting=20the=20p?= =?UTF-8?q?rimary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class-two-factor-core.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 398bb25f..eb5b2149 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -1906,11 +1906,6 @@ public static function enable_provider_for_user( $user_id, $new_provider ) { $enabled_providers[] = $new_provider; - // Add as primary if none set. - if ( ! self::get_primary_provider_for_user( $user_id ) ) { - update_user_meta( $user_id, self::PROVIDER_USER_META_KEY, $new_provider ); - } - return (bool) update_user_meta( $user_id, self::ENABLED_PROVIDERS_USER_META_KEY, $enabled_providers ); }