This topic has 8 replies, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #42641
     Abracadabra
    Participant

    What is the easiest way to set up pages to be in correct order after someone logs in?
    I set the slider page as zero and thats what shows up when someone types in the URL, the problem is that after they go through log in screen the slider page comes back instead of home/member/profile page. I set the order as 0,1,2,3 for various pages but that does not seem to work. Also when someone is logged in and clicks on my URL somewhere on the page they go back to slider page as well.

    #42647
     sharmstr
    Moderator

    Order for what? All that order field is for is when you want to print out a listing of pages.

    If you want to redirect a user to their profile after logging in (which has nothing to do with ordering), see this: https://archived.seventhqueen.com/forums/topic/kleo-login-redirect#post-31684

    If I’ve completely missed the point of what you’re trying to do, let me know 🙂

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

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #42650
     Abracadabra
    Participant

    Yes that is what I am trying to accomplish, ideally after log in I would like the next page to be members/(username) so they would be taken to their own profile page and not members page as that shows all members, my friends etc… that does not look good as main screen.

    I tried this code, leaving activity as is and then changing that to members. I changed the setting to reload current page as well. After log in screen, it still reverts back to slider page. Am I doing something wrong?

    {
    // Check the nonce, if it fails the function will break
    check_ajax_referer( ‘kleo-ajax-login-nonce’, ‘security’ );

    // Nonce is checked, get the POST data and sign in user
    $info = array();
    $info[‘user_login’] = $_POST[‘log’];
    $info[‘user_password’] = $_POST[‘pwd’];
    $info[‘remember’] = (isset( $_POST[‘remember’] ) && $_POST[‘remember’] === true) ? true : false ;

    $info = apply_filters(‘kleo_ajaxlogin_atts’, $info);
    $user_signon = wp_signon( $info, false );
    if ( is_wp_error( $user_signon ) ){
    $error_msg = $user_signon->get_error_message();
    echo json_encode(array( ‘loggedin’ => false, ‘message’ => ‘<span class=”wrong-response”><i class=”icon icon-attention”></i> ‘ . $error_msg . ‘</span>’ ));
    //echo json_encode(array( ‘loggedin’ => false, ‘message’ => ‘<span class=”wrong-response”><i class=”icon icon-attention”></i> ‘ . __( ‘Wrong username or password. Please try again.’, ‘kleo_framework’ ) . ‘</span>’ ));
    } else {
    if ( sq_option( ‘login_redirect’ , ‘default’ ) == ‘reload’ ) {
    $redirecturl = apply_filters( ‘kleo_modal_login_redirect’, ‘/activity/’, ”, $user_signon );
    }
    else {
    $redirecturl = apply_filters( ‘login_redirect’, ”, ”, $user_signon );
    }

    echo json_encode(array(‘loggedin’=>true, ‘redirecturl’ => $redirecturl, ‘message’=> ‘<span class=”good-response”><i class=”icon icon-ok-circled”></i> ‘ . __( ‘Login successful, redirecting…’,’kleo_framework’ ) . ‘</span>’ ));
    }

    die();
    }

    #42653
     sharmstr
    Moderator

    I know for a fact the code works. I have no idea what you are doing wrong. Did you put the code in your child theme? Is your child theme active? Do you have caching enabled?

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

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #42654
     sharmstr
    Moderator

    Also, that code isnt for facebook login.

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

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #42656
     Abracadabra
    Participant

    I have the code in child, theme is active, not sure about caching enabled, can you tell me where to do that?
    So this code will make it impossible to have facebook login?

    #42657
     sharmstr
    Moderator

    I was asking if you have caching enabled on your server. If you dont know what that is, contact your hosting provider to assist you. If caching is turned on, that could be one reason why its not working.

    It will work with facebook log in enabled. What I’m saying is that it will only redirect the standard Kleo login, not the facebook login.

    And actually, the code is for the kleo popup login. If you’re trying to login from some widget or something, this isn’t going to do it.

    I wrote a post about it this morning: http://sharmstr.com/login-redirect/

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

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #42660
     Abracadabra
    Participant

    Unfortunately there is no way for me to disable caching on the server. That must be the reason for it not working as I have everything right. Is there any other way to do this that you know of?

    #42665
     sharmstr
    Moderator

    Leave it the way it is. If caching is the issue, it will work once the cache is expired.

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

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

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

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?