X

Extend auto logout period

Adding this PHP code to the functions.php of your wordpress theme will extend the length of time cookies are kept the example is set to 1 week. Please note the value is defined in seconds



Code Snippet:


function logged_in( $expirein ) {
return 604800; // 1 week in seconds
}
add_filter( 'auth_cookie_expiration', 'logged_in' );

Comments  Leave a Reply

  1. Tweets that mention Wordpress Extend auto logout period – wpsnipp.com Wordpress code snippets for your blog -- Topsy.com December 24, 2010 at 8:23 pm

    […] This post was mentioned on Twitter by wp_freak. wp_freak said: #wordpress Extend auto logout period http://bit.ly/g8NxjE […]

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!