From a666a16993bd3b3c2513ce6628331dc773d647f4 Mon Sep 17 00:00:00 2001 From: Jeffrey Parker Date: Tue, 4 Jun 2024 17:11:38 -0400 Subject: [PATCH] Remove unneeded code accidentally left in during refactoring --- class-duouniversal-wordpressplugin.php | 1 - tests/duoUniversalAuthenticationTest.php | 1 - 2 files changed, 2 deletions(-) diff --git a/class-duouniversal-wordpressplugin.php b/class-duouniversal-wordpressplugin.php index 0f2a8e9..0d1f2cb 100644 --- a/class-duouniversal-wordpressplugin.php +++ b/class-duouniversal-wordpressplugin.php @@ -195,7 +195,6 @@ function duo_authenticate_user( $user = '', $username = '', $password = '' ) { } try { // Update redirect URL to be one associated with initial authentication. - $associated_uri = $this->get_redirect_url( $associated_user->ID ); $this->duo_client->redirect_url = $this->get_redirect_url( $associated_user->ID ); $decoded_token = $this->duo_client->exchangeAuthorizationCodeFor2FAResult( $code, $associated_user->user_login ); } catch ( \Duo\DuoUniversal\DuoException $e ) { diff --git a/tests/duoUniversalAuthenticationTest.php b/tests/duoUniversalAuthenticationTest.php index c4e5fb6..5eb661d 100644 --- a/tests/duoUniversalAuthenticationTest.php +++ b/tests/duoUniversalAuthenticationTest.php @@ -126,7 +126,6 @@ function testClearAuthRemovesMetadata(): void $this->setUpMocks(); $user = $this->createMockUser(); WP_Mock::userFunction('wp_get_current_user', [ 'return' => $user ]); - WP_Mock::userFunction('delete_user_meta', ['return' => function() { throw (new Exception()); } ]); $authentication = new Duo\DuoUniversalWordpress\DuoUniversal_WordPressPlugin($this->duo_utils, $this->duo_client); // Make an auth to populate the database