WordPress Function to Extending Auto Logout Period

Extending Auto Logout Period

Tested on: WordPress 3.0.1

Using the code below you can increase the time cookies are kept and therefor users who are logged in remain logged in longer:

function keep_me_logged_in_for_1_year( $expirein ) {
   return 31556926; // 1 year in seconds
}
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *