From 80b8b439a13b18e9704929278bd43b5765b5c2da Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Thu, 8 Dec 2005 11:43:23 +0000 Subject: [PATCH] Update for new authentication system. --- presentation/logout.php | 45 ++++++++++++++------------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/presentation/logout.php b/presentation/logout.php index 2042986..f058943 100644 --- a/presentation/logout.php +++ b/presentation/logout.php @@ -1,36 +1,19 @@ , Jam Warehouse (Pty) Ltd, South Africa - */ - -// main library routines and defaults require_once("../config/dmsDefaults.php"); +require_once(KT_LIB_DIR . '/authentication/authenticationutil.inc.php'); + +class KTLogoutDispatcher extends KTStandardDispatcher { + function do_main() { + global $default; -// logout -$oAuth = new $default->authenticationClass; -$oAuth->logout(); + $oAuthenticator =& KTAuthenticationUtil::getAuthenticatorForUser($this->oUser); + $oAuthenticator->logout($this->oUser); + Session::destroy(); -// redirect to root -redirect((strlen($default->rootUrl) > 0 ? $default->rootUrl : "/")); + redirect((strlen($default->rootUrl) > 0 ? $default->rootUrl : "/")); + exit(0); + } +} +$d =& new KTLogoutDispatcher; +$d->dispatch(); ?> -- libgit2 0.21.4