Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #879007

    Hello,

    Could you please advise what exactly code should I insert in functions.php in order for extending user’s session timeout?

    I’ve tried some codes before like this one:

    function chuck_extend_admins_login_session( $expiration, $user_id, $remember ) {
    if ( $remember && user_can( $user_id, ‘manage_options’ ) ) {
    $expiration = 7776000; // 90 days in seconds
    }
    return $expiration;
    }
    add_filter( ‘auth_cookie_expiration’,’chuck_extend_admins_login_session’, 10, 3 );

    However this didn’t work – also some other untested plugins with wp 4.9 version didn’t work either.

    I’m looking for a solution referring to every registered user (not only admin) to extend the logout session.

    Your input is much appreciated.

    Kind regards,
    George

    • This topic was modified 7 years ago by asteratos.
    #879751

    Hi George,

    It’s related on wordpress and not the Enfold theme so it’s outside the scope of our support but I think this link might help: https://premium.wpmudev.org/blog/how-to-extend-the-auto-logout-period-in-wordpress/ (unfortunately the ones I can found out have been posted years ago :( )

    Best regards,
    Nikko

    #879920

    Hi Nikko, thank you for your input.

    In case this works or something similar, I will let the community know!

    Kind regards,
    George

    #880007

    Hi George,

    Thanks, it would surely be helpful :)

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.