Incompatibility with Theme My Login and other custom login pages
-
I’m using the Theme My Login plugin to create a custom login page. If a user who isn’t logged in tries to go directly to a members-only page (eg. from a bookmark) he is redirected to wp-login.php instead of the login page provided by Theme My Login.
It’s an easy fix, I’ve applied this patch to my site…
diff -Naur wordpress-access-control-4.0.0/wordpress-access-control.php wordpress-access-control-4.0.0-patched/wordpress-access-control.php --- wordpress-access-control-4.0.0/wordpress-access-control.php 2013-12-13 23:26:16.000000000 +0000 +++ wordpress-access-control-4.0.0-patched/wordpress-access-control.php 2013-12-14 11:01:46.535526565 +0000 @@ -269,7 +269,7 @@ $redirect_to = get_post_meta($post->ID, '_wpac_members_redirect_to', true); if (empty($redirect_to)) { - header('Location: ' . get_bloginfo('wpurl') . '/wp-login.php?redirect_to=' . $_SERVER['REQUEST_URI']); + header( 'Location: ' . wp_login_url( site_url( $_SERVER['REQUEST_URI'] ) ) ); } else { header('Location: ' . add_query_arg('redirect_to', $_SERVER['REQUEST_URI'], $redirect_to)); }
I may have reported this before, but it’s still there in 4.0.0.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Incompatibility with Theme My Login and other custom login pages’ is closed to new replies.