Skip to content

Commit

Permalink
Redirect to home page after logging in if using custom login url
Browse files Browse the repository at this point in the history
with WPS Hide Login plugin
#103
  • Loading branch information
figureone committed Nov 1, 2021
1 parent ba7ee58 commit e6e4d8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/authorizer/class-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,13 @@ public static function modify_current_url_for_external_login( $provider = 'cas'
$url = wp_login_url( $url );
}

// Edge case: If the WPS Hide Login plugin is installed, redirect to home
// page after logging in instead of the plugin's login endpoint, which will
// redirect to /wp-admin.
if ( class_exists( '\WPS\WPS_Hide_Login\Plugin' ) ) {
$url = wp_login_url( home_url() );
}

// Parse the URL into its components.
$parsed_url = wp_parse_url( $url );

Expand Down

0 comments on commit e6e4d8d

Please sign in to comment.