Merge pull request #127 from TeDo-Verlag/redirect

added force_redirect parameter and login action
isekai
Jonathan Daggerhart 6 years ago committed by GitHub
commit 9f02df4cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -378,7 +378,9 @@ class OpenID_Connect_Generic_Client_Wrapper {
// login the found / created user
$this->login_user( $user, $token_response, $id_token_claim, $user_claim, $subject_identity );
do_action( 'openid-connect-generic-user-logged-in', $user );
// log our success
$this->logger->log( "Successful login for: {$user->user_login} ({$user->ID})", 'login-success' );

@ -39,7 +39,8 @@ class OpenID_Connect_Generic_Login_Form {
*/
function handle_redirect_login_type_auto()
{
if ( $GLOBALS['pagenow'] == 'wp-login.php' && $this->settings->login_type == 'auto'
if ( $GLOBALS['pagenow'] == 'wp-login.php'
&& ( $this->settings->login_type == 'auto' || ! empty( $_GET['force_redirect'] ) )
&& ( ! isset( $_GET[ 'action' ] ) || $_GET[ 'action' ] !== 'logout' )
&& ! isset( $_POST['wp-submit'] ) )
{

Loading…
Cancel
Save