KrynLabs/Kryn.cms — Issue #76: Logout - not always logged out
Author: PyroMani
Created: 2011-12-06 11:06:25+00:00
State: open

When you log in using the users plugin and try to logout, you're not always logged out properly.
Currently the _user_rsn_ is set to _0_:

function pluginLogin( $pConf ){
...
$client->logout();
...
}

public function logout() {
$this->setUser(0);
}

public function setUser($pUserRsn, $pLoadUser = true) {
$this->set('user_rsn', $pUserRsn); //will be saved at shutdown

if ($pLoadUser)
$this->loadUser($pUserRsn);
}

public function set($pCode, $pValue) {
if ($this->session[$pCode] == $pValue) return;

$this->needSync = true;
$this->session[$pCode] = $pValue;
}

In the session table the value of _user_rsn_ remains unchanged as does the cookie value of _krynsessionid_.
So in the end, you're _not_ logged out.