Commit 80b8b439a13b18e9704929278bd43b5765b5c2da
1 parent
15039869
Update for new authentication system.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4368 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
14 additions
and
31 deletions
presentation/logout.php
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * $Id$ | |
| 4 | - * | |
| 5 | - * This page logs the current user out of the system. | |
| 6 | - * | |
| 7 | - * Copyright (c) 2003 Jam Warehouse http://www.jamwarehouse.com | |
| 8 | - * | |
| 9 | - * This program is free software; you can redistribute it and/or modify | |
| 10 | - * it under the terms of the GNU General Public License as published by | |
| 11 | - * the Free Software Foundation; either version 2 of the License, or | |
| 12 | - * (at your option) any later version. | |
| 13 | - * | |
| 14 | - * This program is distributed in the hope that it will be useful, | |
| 15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | - * GNU General Public License for more details. | |
| 18 | - * | |
| 19 | - * You should have received a copy of the GNU General Public License | |
| 20 | - * along with this program; if not, write to the Free Software | |
| 21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | - * | |
| 23 | - * @version $Revision$ | |
| 24 | - * @author Michael Joseph <michael@jamwarehouse.com>, Jam Warehouse (Pty) Ltd, South Africa | |
| 25 | - */ | |
| 26 | - | |
| 27 | -// main library routines and defaults | |
| 28 | 2 | require_once("../config/dmsDefaults.php"); |
| 3 | +require_once(KT_LIB_DIR . '/authentication/authenticationutil.inc.php'); | |
| 4 | + | |
| 5 | +class KTLogoutDispatcher extends KTStandardDispatcher { | |
| 6 | + function do_main() { | |
| 7 | + global $default; | |
| 29 | 8 | |
| 30 | -// logout | |
| 31 | -$oAuth = new $default->authenticationClass; | |
| 32 | -$oAuth->logout(); | |
| 9 | + $oAuthenticator =& KTAuthenticationUtil::getAuthenticatorForUser($this->oUser); | |
| 10 | + $oAuthenticator->logout($this->oUser); | |
| 11 | + Session::destroy(); | |
| 33 | 12 | |
| 34 | -// redirect to root | |
| 35 | -redirect((strlen($default->rootUrl) > 0 ? $default->rootUrl : "/")); | |
| 13 | + redirect((strlen($default->rootUrl) > 0 ? $default->rootUrl : "/")); | |
| 14 | + exit(0); | |
| 15 | + } | |
| 16 | +} | |
| 17 | +$d =& new KTLogoutDispatcher; | |
| 18 | +$d->dispatch(); | |
| 36 | 19 | ?> | ... | ... |