Changing the duration of login in WordPress

WordPress remembers your login during some time. If you want to change it to one year, add this code to your functions.php

add_filter( ‘auth_cookie_expiration’, ‘keep_me_logged_in_for_1_year’ );

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

Source: Stefano Gorgoni’s blog

Advertisements
This entry was posted in IT stuff and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s