Fix user redirection for non-loggedin users

This commit is contained in:
champsupertramp
2016-06-21 23:03:41 +08:00
parent 3f3721270d
commit 77c5f0c83a
+9 -1
View File
@@ -55,6 +55,7 @@
}
}
/***
@@ -137,7 +138,7 @@
add_action('um_access_post_settings','um_access_post_settings');
function um_access_post_settings() {
global $post, $ultimatemember;
// woo commerce shop ID
if( function_exists('is_shop') && is_shop() ) {
@@ -233,6 +234,13 @@
}
if( um_is_core_page('user') && ! is_user_logged_in() ){
$ultimatemember->access->allow_access = false;
$ultimatemember->access->redirect_handler = esc_url( $access_redirect );
wp_redirect( $ultimatemember->access->redirect_handler );
exit;
}
if ( $redirect_to ) {
if ( ! is_feed() ) {
$ultimatemember->access->allow_access = false;