X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=lib%2Fauth0.php;fp=lib%2Fauth0.php;h=46b55148268ca604d3fce9c23731837fd55e789c;hb=ae839ebaa4e1e0ae4cee28c16cc0bc7a0368f4af;hp=96412f25e9f7e07ffe695dc49429ba371bd224b7;hpb=ea0e53db8b5a264b6e231038815d2c350076d02a;p=readifood.git diff --git a/lib/auth0.php b/lib/auth0.php index 96412f2..46b5514 100644 --- a/lib/auth0.php +++ b/lib/auth0.php @@ -16,6 +16,21 @@ ini_set("session.save_handler", "memcached"); ini_set("session.save_path", getenv("MEMCACHED")); } + else { + include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "SessionHandler.php"))); + $session_handler = new \JL\SessionHandler(); + $session_handler->setPDO(Propel::getConnection()); + $session_handler->setDbTable('Session'); + session_set_save_handler( + array($session_handler, 'open'), + array($session_handler, 'close'), + array($session_handler, 'read'), + array($session_handler, 'write'), + array($session_handler, 'destroy'), + array($session_handler, 'gc') + ); + register_shutdown_function('session_write_close'); + } $auth0 = new Auth0([ 'domain' => $AUTH0_DOMAIN,