From 7f3c48cf02e1596535aa02f377455780e4fde0e3 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 1 Oct 2010 11:44:55 -0600 Subject: [PATCH] Add logout application method - used for logout tasks --- framework/Core/lib/Horde/Registry.php | 9 +++++++++ framework/Core/lib/Horde/Registry/Application.php | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index c41ef868a..c71f2f3d0 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -1697,6 +1697,15 @@ class Horde_Registry */ public function clearAuth($destroy = true) { + /* Do logout tasks. */ + if (!empty($_SESSION['horde_auth']['app'])) { + foreach (array_keys($_SESSION['horde_auth']['app']) as $app) { + try { + $this->callAppMethod($app, 'logout'); + } catch (Horde_Exception $e) {} + } + } + unset($_SESSION['horde_auth']); /* Remove the user's cached preferences if they are present. */ diff --git a/framework/Core/lib/Horde/Registry/Application.php b/framework/Core/lib/Horde/Registry/Application.php index 197eb5eab..34305bf51 100644 --- a/framework/Core/lib/Horde/Registry/Application.php +++ b/framework/Core/lib/Horde/Registry/Application.php @@ -109,6 +109,11 @@ class Horde_Registry_Application // Functions called from Horde's API. /** + * Tasks to perform at logout. + */ + // public function logout() + + /** * Removes user data. * * @param string $user Name of user to remove data for. -- 2.11.0