WordPress.org

Support

Support » How-To and Troubleshooting » Change Login Cookie

Change Login Cookie

  • I’m designing a blog that will mostly be used by people on shared computers, and all of them will have to post (they’re police officers in their cruisers — mobile intranet — if you are really interested). Therefore, the normal way that WordPress administers cookies is inadequate, because teaching people to logout is harder than you might think. Is there a way to set a shorter time for a valid cookie (i.e. 10 minutes), or make it so they always have to login (never saves information)? Also, could I add a check box somehow to allow it to save the login information (for those that do not share a computer — this is less important though)? WP 1.5

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Search for calls to “setcookie” in the wordpress code, you should find them in wp-login.php file and a file in the /wp-admin directory. The number you see there is the number of seconds after which the cookie is to expire. By default, the value is insanely large, just bring that down to 600 for 10 minutes.

    Regards

    Here’s a plugin that will allow you to set the login cookie expiration:

    WordPress Plugin: Cookie Timeout

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Login Cookie’ is closed to new replies.