From f6ef053dda7e940f0fa00a2aa610fc5482df70ef Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Wed, 25 Nov 2015 20:38:20 +0800 Subject: [PATCH] Fixed multiple redirection in page restriction --- core/um-access.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/um-access.php b/core/um-access.php index 1c0c8823..edada558 100644 --- a/core/um-access.php +++ b/core/um-access.php @@ -25,9 +25,10 @@ class UM_Access { 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 + if ( strstr( $this->redirect_handler, um_get_core_page('login') ) ){ $curr = $ultimatemember->permalinks->get_current_url(); $this->redirect_handler = esc_url( add_query_arg('redirect_to', $curr, $this->redirect_handler) );