New WordPress Plugin to configure user timeouts

I published my second plugin for WordPress today. It lets you configure how long user sessions and the “remember me” cookie last. By default they’re only 2 days and 2 weeks, respectively.

Twofold impetus: a problem with the internal P2 microblog at work when people like me left their browsers open for long periods, and the fact that I access too many WordPress blogs from too many different computers for the 2 week “Remember Me” timeout to be convenient enough. Cranking it up to 22 years!

The WordPress documentation is pretty great BTW.

And it was a little bit interesting to run in to the Year 2038 problem with 32-bit int timestamps.  I don’t know, it was fun working around the  “infinity” ceiling:

  if ( PHP_INT_MAX - time() < $expire_in ) {
    $expire_in =  PHP_INT_MAX - time() - 5;
  }