mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +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');
|
||||
|
||||
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) );
|
||||
|
||||
Reference in New Issue
Block a user