mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 05:33:36 +09:00
Fixed multiple redirection in page restriction
This commit is contained in:
+2
-1
@@ -25,9 +25,10 @@ class UM_Access {
|
|||||||
|
|
||||||
do_action('um_access_post_settings');
|
do_action('um_access_post_settings');
|
||||||
|
|
||||||
if ( $this->redirect_handler && !$this->allow_access ) {
|
if ( $this->redirect_handler && !$this->allow_access && ! um_is_core_page('login') ) {
|
||||||
|
|
||||||
// login page add protected page automatically
|
// login page add protected page automatically
|
||||||
|
|
||||||
if ( strstr( $this->redirect_handler, um_get_core_page('login') ) ){
|
if ( strstr( $this->redirect_handler, um_get_core_page('login') ) ){
|
||||||
$curr = $ultimatemember->permalinks->get_current_url();
|
$curr = $ultimatemember->permalinks->get_current_url();
|
||||||
$this->redirect_handler = esc_url( add_query_arg('redirect_to', $curr, $this->redirect_handler) );
|
$this->redirect_handler = esc_url( add_query_arg('redirect_to', $curr, $this->redirect_handler) );
|
||||||
|
|||||||
Reference in New Issue
Block a user