[pmwiki-users] URGENT: Global Password Reset

Patrick R. Michaud pmichaud at pobox.com
Tue Aug 2 10:26:00 CDT 2005


On Mon, Aug 01, 2005 at 10:59:05AM -0400, Ryan D'Baisse wrote:
> Okay, how about a way to "forget" the password and/or "logout"?  

The following code (in a configuration file) adds an ?action=logout 
that removes any entered passwords, authentication, identification, 
and skin settings...

  if ($action == 'logout') {
    @session_start();
    $_SESSION = array();
    foreach(array(session_name(), 'setskin', 'setprefs', 'author') as $c) 
      if (isset($_COOKIE[$c]))
        setcookie($c, '', $Now-86400, '/');
    session_destroy();
  }


It doesn't remove browser caching of http-basic authentication
passwords, but we can see about adding that if needed.

Pm





More information about the pmwiki-users mailing list