• On a site where this addon is active, I noticed that users need to re-log in all the time, like every day. If I set the normal durations to longer with code like:

    add_filter('auth_cookie_expiration', function($expire_in, $user_id, $remember) {
    // Set custom expiration time (e.g., 30 days)
    if ($remember) {
    return 30 * DAY_IN_SECONDS; // 30 days for "Remember Me"
    } else {
    return 7 * DAY_IN_SECONDS; // 7 days for normal login
    }
    }, 10, 3);

    Does this plugin respect that?

    I see you make use of this filter at one point, but there is a $expiration = time() + 172800; before wp_generate_auth_cookie calls. Is that hardcoded to be 2 days unless I use these hooks?

    set_user_switching_cookie
    set_olduser_cookie

    Other admins use this plugin’s switching function, I hardly ever. But I get constantly logged out as well (as if this site was for a bank), I have no idea how the experience is for regular users, but I’d like to make them stay logged on waay longer. Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    This plugin shouldn’t affect the expiry time of regular logged in cookies, no. I will investigate properly next week and report back.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.