Exemplo n.º 1
0
 function testDeleteSession()
 {
     $this->generateSession();
     $this->dalSession->deleteSession(SESSIONID);
     $prefix = OA_Dal::getTablePrefix();
     $table = $this->dbh->quoteIdentifier($prefix . 'session');
     $cSessions = $this->dbh->queryOne("SELECT count(*) AS c FROM {$table}");
     $this->assertEqual(0, $cSessions);
 }
Exemplo n.º 2
0
/**
 * Destroy the current session
 *
 * @todo Determine how much of these steps are unnecessary, and remove them.
 */
function phpAds_SessionDataDestroy()
{
    $dal = new MAX_Dal_Admin_Session();
    global $session;
    $dal->deleteSession($_COOKIE['sessionID']);
    MAX_cookieAdd('sessionID', '');
    MAX_cookieFlush();
    unset($session);
    unset($_COOKIE['sessionID']);
}