How to avoid auto logoff?
-
I tried using couple of plugins to avoid this, which uses core WordPress filter hook to change the core auth cookie expiration date. But it is still not working. I want to keep the customers login until they manually choose to logout from Myaccount page.
I tried with this code as well, it is still not working
// 365 days login duration
function wpset_change_cookie_logout( $expiration, $user_id, $remember ) {
if( $remember && user_can( $user_id, ‘manage_options’ ) ){
$expiration = 31556926;
}
return $expiration;
}
add_filter( ‘auth_cookie_expiration’,’wpset_change_cookie_logout’, 10, 3 );Please help!
WP.com: Unknown
Jetpack: Unknown
Correct account: Unknown -
Hi,
It looks like your site is using the open-source WordPress software (from WordPress.org) but is hosted with another webhost.
We’re only able to provide support for WordPress websites that are hosted by us here at WordPress.com. For help with a WordPress site hosted elsewhere you’ll need to ask over at the WordPress.org forums:
https://wordpress.org/support/forums/
Depending on the level of support that is included with your hosting plan, your webhost’s support team may also be able to assist.
If you want to know more about the differences between WordPress.com and the open-source WordPress software you can read this article:
- The topic ‘How to avoid auto logoff?’ is closed to new replies.