From cbbac5b0fcc4bae2caa60bc97af5e56c4e1158b9 Mon Sep 17 00:00:00 2001 From: Michael Fairchild <mfairchild365@gmail.com> Date: Mon, 15 Feb 2016 15:52:07 -0600 Subject: [PATCH] Throw an exception if session can't be destroyed --- plugins/cas_auth_unl/start.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/cas_auth_unl/start.php b/plugins/cas_auth_unl/start.php index 8e27de43..bd218f18 100644 --- a/plugins/cas_auth_unl/start.php +++ b/plugins/cas_auth_unl/start.php @@ -128,7 +128,9 @@ class UnlCAS { $data = $item->get(); $handler = new Elgg\Http\DatabaseSessionHandler(_elgg_services()->db); - $handler->destroy($data['session_id']); + if (!$handler->destroy($data['session_id'])) { + throw new \Exception('unable to destroy session on single sign out'); + } //Remove the cached item $item->clear(); -- GitLab