From 9119f0a5442ece4213080016a68264dfcc64d819 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 1 May 2008 14:03:59 +0000 Subject: Introducing gatekeeper(); git-svn-id: https://code.elgg.org/elgg/trunk@593 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sessions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php index bac8371a4..b9a549697 100644 --- a/engine/lib/sessions.php +++ b/engine/lib/sessions.php @@ -150,6 +150,14 @@ } } + /** + * Used at the top of a page to mark it as logged in users only. + * + */ + function gatekeeper() { + if (!isloggedin()) forward(); + } + register_event_handler("init","system","session_init",1); //register actions ************************************************************* -- cgit v1.2.3