admin管理员组文章数量:1026205
I want to extend the login session so that I never ever get logged out. Even if Remember me is left unchecked.
This is the code I have at the moment, but it doesn't seem to work with Remember me unchecked:
function extend_login_cookie_expiration( $expiration, $user_id, $remember ) {
if ( !is_super_admin() ) {
$expiration = 946708560;
}
return $expiration;
}
add_filter( 'auth_cookie_expiration', 'extend_login_cookie_expiration', 10, 3 );
I want to extend the login session so that I never ever get logged out. Even if Remember me is left unchecked.
This is the code I have at the moment, but it doesn't seem to work with Remember me unchecked:
function extend_login_cookie_expiration( $expiration, $user_id, $remember ) {
if ( !is_super_admin() ) {
$expiration = 946708560;
}
return $expiration;
}
add_filter( 'auth_cookie_expiration', 'extend_login_cookie_expiration', 10, 3 );
本文标签: customizationAlways logged in even if remember me is unchecked
版权声明:本文标题:customization - Always logged in even if remember me is unchecked? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745629677a2160083.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论