|
|
|
@ -89,10 +89,14 @@ class OpenID_Connect_Generic_Login_Form {
|
|
|
|
|
// record the URL of this page if set to redirect back to origin page
|
|
|
|
|
if( $this->settings->redirect_user_back ) {
|
|
|
|
|
$redirect_expiry = time() + DAY_IN_SECONDS;
|
|
|
|
|
if ( $GLOBALS['pagenow'] == 'wp-login.php' )
|
|
|
|
|
$redirect_url = admin_url();
|
|
|
|
|
else
|
|
|
|
|
if ( $GLOBALS['pagenow'] == 'wp-login.php' ) {
|
|
|
|
|
if( isset( $_REQUEST['redirect_to'] ) )
|
|
|
|
|
$redirect_url = esc_url( $_REQUEST['redirect_to'] );
|
|
|
|
|
else
|
|
|
|
|
$redirect_url = admin_url();
|
|
|
|
|
} else {
|
|
|
|
|
$redirect_url = home_url( esc_url( add_query_arg( NULL, NULL ) ) );
|
|
|
|
|
}
|
|
|
|
|
setcookie( $this->client_wrapper->cookie_redirect_key, $redirect_url, $redirect_expiry, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|