Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bsatsangi

    (@bsatsangi)

    i am trying to use wordpress login cookies extended time, but looks like its only valid when login from wordpress login page and not from login popup, please advise.

    Plugin Author xootix

    (@xootix)

    Hello,

    It should work fine. Plugin does not modify the “remember me duration” cookie & it uses the wordpress’s login function wp_signon to login.

    Try this snippet and see if it works with your login cookie plugin

    add_filter( 'xoo_el_login_credentials', function( $creds ){
    $creds['remember'] = true;
    return $creds;
    } );

    If it doesn’t work, here is the snippet for setting login expiration time

    function keep_me_logged_in_for_1_year( $expirein ) {
    return 31556926; // 1 year in seconds
    }
    add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Persistant login’ is closed to new replies.