From 6ecb69f1cb02949c46fc74e8b25f79f6c31b0469 Mon Sep 17 00:00:00 2001 From: Slavic Dragovtev Date: Sun, 21 Apr 2019 16:42:30 +0300 Subject: [PATCH] Allow override of the plugin by posting credentials to wp-login.php (#118) * allow overriding the plugin if credentials are POSTed to wp-login.php * fix indentation to be consistent --- includes/openid-connect-generic-login-form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/openid-connect-generic-login-form.php b/includes/openid-connect-generic-login-form.php index 227045e..27bb7aa 100644 --- a/includes/openid-connect-generic-login-form.php +++ b/includes/openid-connect-generic-login-form.php @@ -40,7 +40,8 @@ class OpenID_Connect_Generic_Login_Form { function handle_redirect_login_type_auto() { if ( $GLOBALS['pagenow'] == 'wp-login.php' && $this->settings->login_type == 'auto' - && ( ! isset( $_GET[ 'action' ] ) || $_GET[ 'action' ] !== 'logout' ) ) + && ( ! isset( $_GET[ 'action' ] ) || $_GET[ 'action' ] !== 'logout' ) + && ! isset( $_POST['wp-submit'] ) ) { if ( ! isset( $_GET['login-error'] ) ) { wp_redirect( $this->client_wrapper->get_authentication_url() );