CBL RememberMe

CBL RememberMe is a tiny library that adds the "remember me" functionality to PHP session handling.
Download

CBL RememberMe Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Cybozu Labs, Inc.
  • Publisher web site:
  • http://q4m.31tools.com/

CBL RememberMe Tags


CBL RememberMe Description

CBL RememberMe is a tiny library that adds the "remember me" functionality to PHP session handling. By using the library, you can continue using the good old $_SESSION variable, while adding the "remember me" funcitionality to your web application.Setup:In order to use CBL RememberMe, runtime configuration variable session.cookie_lifetime should be set in php.ini. Below example sets the lifetime to one week. The lifetime can alternatively be set at runtime by calling session_set_cookie_params. session.cookie_lifetime = 604800 # in php.ini, set expiration to 7 daysUsage:Construct the RememberMe object with two parameters; name of the cookie to be used for handling state, and, a boolean flag indicating whether or not the "remember me" functionality should be turned on by default.To turn on / to turn off the "remember me" functionality, call setRemember function.When clearing session information (i.e. resetting the $_SESSION object), a special variable $_SESSION should be preserved. For this purpose, you can use the clear function. /* construct the rememberme object */ $gRememberMe = new CBL_RememberMe('rememberme', true); /* don't remember me */ $gRememberMe->setRemember(false); /* remember me */ $gRememberMe->setRemember(true); /* clear session info (replacement for $_SESSION = array()) */ $gRememberMe->clear();What's New in This Release:· The 'remember' function now refers to the $this->default_remember variable when a new user connects.


CBL RememberMe Related Software