This topic has 7 replies, 5 voices, and was last updated 9 years by Anchora.

  • Author
  • #15469
     brodas
    Participant

    hello,

    restrict access to users / profiles to anyone visiting the web that is not registered, it is possible? Example: Also add a message (register here)

    Anyone can visit the profiles of users to access any web content ..

    Thanks

    #15545
     brodas
    Participant

    anyone?

    #15660
     brodas
    Participant

    uppp

    #15686
     Abe
    Keymaster

    Hi, sorry for the late reply with the Easter.

    With the theme you can only do that with the Paid memberships plugin and redirect user to the Levels page.

    Other than that you need to implement a code to do that custom request.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #15877
     mhamouda
    Participant

    interested

    #15883
     brodas
    Participant

    I do not understand, can not be hidden and users publicly only for users can see each other? I mean?

    users for users .. no publicly that anyone can view the photos .. must be premium membership?

    thanks!!

    #15898
     Splendor
    Participant
    #16530
     Anchora
    Participant

    two ways for us:

    `
    add_action( ‘wp’, ‘custom_lockdown_redirect’, 3 );
    function custom_lockdown_redirect(){
    global $wp;
    if (!is_user_logged_in()){
    if ( bp_is_activation_page()
    || bp_is_register_page()
    || bp_is_blog_page(‘/category/allgemein/’)
    || is_page_template( ‘endfit-custom.php’ )
    || ( in_array( $GLOBALS[‘pagenow’], array( ‘wp-login.php’ )))
    )
    return;
    bp_core_redirect(get_option(‘siteurl’) . “/register”);
    exit;
    }
    }

    and another possible solution:

    //Redirect only guests to register page
    add_filter(‘kleo_pmpro_url_redirect’, ‘kleo_my_custom_guest_redirect’);

    function kleo_my_custom_guest_redirect($redirect)
    {
    if (!is_user_logged_in()){
    return home_url().’/registrierung’;
    }
    else
    {
    return $redirect;
    }
    }

    hope that helps^^

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Restrict users profile’ is closed to new replies.

Log in with your credentials

Forgot your details?