Change Login Cookie (3 posts)

  1. apoulemanos
    Posted 11 years ago #

    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


  2. Cypher
    Posted 11 years ago #

    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.


  3. FreeMoby
    Posted 11 years ago #

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


Topic Closed

This topic has been closed to new replies.

About this Topic