aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 14:03:59 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 14:03:59 +0000
commit9119f0a5442ece4213080016a68264dfcc64d819 (patch)
tree7a535df524c05f2321a4fe318d13a9cc1f8dee5e
parentc123a6e5546b0cd0b8ed7f6b580ec6a03fecae81 (diff)
downloadelgg-9119f0a5442ece4213080016a68264dfcc64d819.tar.gz
elgg-9119f0a5442ece4213080016a68264dfcc64d819.tar.bz2
Introducing gatekeeper();
git-svn-id: https://code.elgg.org/elgg/trunk@593 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/sessions.php8
1 files changed, 8 insertions, 0 deletions
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 *************************************************************