aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorEvan Winslow <evan.b.winslow@gmail.com>2010-07-17 04:30:50 +0000
committerEvan Winslow <evan.b.winslow@gmail.com>2010-07-17 04:30:50 +0000
commitf9325c79022b73185f07b157511f9c03892ac379 (patch)
tree4bd2a9447092966187536bb66989032c3f94caa5 /start.php
parentbbf3eed9664d6a6371d29ad16ad4bea05bc34080 (diff)
downloadelgg-f9325c79022b73185f07b157511f9c03892ac379.tar.gz
elgg-f9325c79022b73185f07b157511f9c03892ac379.tar.bz2
Adding content of registration terms plugin
Diffstat (limited to 'start.php')
-rw-r--r--start.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/start.php b/start.php
new file mode 100644
index 000000000..de7657fab
--- /dev/null
+++ b/start.php
@@ -0,0 +1,28 @@
+<?php
+/*******************************************************************************
+ * registrationterms
+ *
+ * @author Administrator
+ ******************************************************************************/
+
+ function registrationterms_init()
+ {
+ global $CONFIG;
+
+ //put the terms agreement at the very end
+ extend_view('register/extend', 'registrationterms/register', 1000);
+
+ //block user registration if they don't check the box
+ register_plugin_hook('action', 'register', 'registrationterms_register_hook');
+ }
+
+ function registrationterms_register_hook()
+ {
+ if (get_input('agreetoterms',false) != 'true') {
+ register_error(elgg_echo('agreetoterms:required'));
+ forward($_SERVER['HTTP_REFERER']);
+ }
+ }
+
+ register_elgg_event_handler('init', 'system', 'registrationterms_init');
+?> \ No newline at end of file