Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion onelogin-saml-sso/onelogin_saml.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function onelogin_enqueue_script() {
wp_enqueue_script( 'onelogin-hide-login-form', plugins_url( 'assets/js/hide-login-form.js', __FILE__ ), array('jquery'), null, true );
}

if ((strpos($_SERVER['SCRIPT_NAME'], 'wp-login.php') !== FALSE) && $action == 'login' && !isset($_GET['normal'])) {
if ((strpos($_SERVER['SCRIPT_NAME'], 'wp-login.php') !== FALSE) && $action == 'login' && !isset($_GET['normal']) && !isset($_GET['loggedout'])) {
if (!get_option('onelogin_saml_keep_local_login', false)) {
add_action( 'login_enqueue_scripts', 'onelogin_enqueue_script', 10 );
}
Expand Down
5 changes: 3 additions & 2 deletions onelogin-saml-sso/php/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ function saml_custom_login_footer() {
}

$login_page = 'wp-login.php';
if (is_plugin_active('wps-hide-login/wps-hide-login.php')) {
$login_page = str_replace( 'wp-login.php', get_site_option( 'whl_page', 'login' ), $login_page ) . '/';
$active_plugins = get_option( 'active_plugins' );
if ( is_array( $active_plugins ) && ! empty( $active_plugins ) && in_array( 'wps-hide-login/wps-hide-login.php', $active_plugins, true ) ) {
$login_page = str_replace( 'wp-login.php', esc_url( get_site_option( 'whl_page', 'login' ) ), $login_page ) . '/';
}

$redirect_to = isset($_GET['redirect_to']) ? '&redirect_to='.$_GET['redirect_to'] : '';
Expand Down