I wanted to log users out of the back office after 15 minutes of inactivity.
With my code, the disconnection works but also if I am active.
function myplugin_cookie_expiration( $expiration, $user_id, $remember ) {
return $remember ? $expiration : 900;
}
add_filter( 'auth_cookie_expiration', 'myplugin_cookie_expiration', 99, 3 );
Any tips?