From 8e2a78f2a712d7f27eddbdd4598b5def729386e7 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Tue, 4 Oct 2016 21:24:33 +0800 Subject: [PATCH] Fix page restriction --- core/um-actions-access.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/um-actions-access.php b/core/um-actions-access.php index 54dd7665..e53dc494 100644 --- a/core/um-actions-access.php +++ b/core/um-actions-access.php @@ -557,6 +557,8 @@ } $args = $ultimatemember->access->get_meta( $um_post_id ); + + extract( $args ); // Check for parent page's custom access settings @@ -732,7 +734,7 @@ } } - if( um_is_core_page('user') && ! is_user_logged_in() && ! empty( $access_redirect ) ){ + if( um_is_core_page('user') && ! is_user_logged_in() && ! empty( $access_redirect ) && isset( $args['custom_access_settings'] ) && $args['custom_access_settings'] != 0 ){ $ultimatemember->access->allow_access = false; $access_redirect = $ultimatemember->access->set_referer( $access_redirect, "user_page" ); $ultimatemember->access->redirect_handler = esc_url( $access_redirect );