From 494cb43c49172090b965bd8277d3888c3ab66f83 Mon Sep 17 00:00:00 2001 From: Robert Staddon Date: Fri, 13 May 2016 15:56:52 -0500 Subject: [PATCH] Only link existing user if the setting is enabled --- includes/openid-connect-generic-client-wrapper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/openid-connect-generic-client-wrapper.php b/includes/openid-connect-generic-client-wrapper.php index 7f8133c..7339751 100644 --- a/includes/openid-connect-generic-client-wrapper.php +++ b/includes/openid-connect-generic-client-wrapper.php @@ -413,8 +413,9 @@ class OpenID_Connect_Generic_Client_Wrapper { } // Before trying to create the user, first check if a user with the same email already exists - if( $uid = email_exists( $email ) ) { - return $this->update_existing_user( $uid, $subject_identity ); + if( $uid = email_exists( $email ) ) { + return $this->update_existing_user( $uid, $subject_identity ); + } } // allow other plugins / themes to determine authorization