aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorEvan Winslow <evan@elgg.org>2011-03-18 22:25:02 -0700
committerEvan Winslow <evan@elgg.org>2011-03-18 22:25:02 -0700
commit198cd62a80dbc685d8e10686e81c7b5a4a2f2773 (patch)
treea2edd1abacf09699c1525630a0fa2e563535dd64 /start.php
parent9e4ac3d0d5b24cd6c91b33a5402fb5e636df61f4 (diff)
downloadelgg-198cd62a80dbc685d8e10686e81c7b5a4a2f2773.tar.gz
elgg-198cd62a80dbc685d8e10686e81c7b5a4a2f2773.tar.bz2
Cleaned up registration terms and updated to 1.8 style
Upped version.
Diffstat (limited to 'start.php')
-rw-r--r--start.php37
1 files changed, 14 insertions, 23 deletions
diff --git a/start.php b/start.php
index de7657fab..acd890ae1 100644
--- a/start.php
+++ b/start.php
@@ -1,28 +1,19 @@
<?php
-/*******************************************************************************
- * registrationterms
- *
- * @author Administrator
- ******************************************************************************/
- function registrationterms_init()
- {
- global $CONFIG;
+function registrationterms_init() {
+ //put the terms agreement at the very end
+ elgg_extend_view('register/extend', 'registrationterms/register', 1000);
- //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']);
- }
+ //block user registration if they don't check the box
+ elgg_register_plugin_hook_handler('action', 'register', 'registrationterms_register_hook');
+}
+
+function registrationterms_register_hook() {
+ if (get_input('agreetoterms', false) != 'true') {
+ register_error(elgg_echo('registrationterms:required'));
+ forward(REFERER);
}
-
- register_elgg_event_handler('init', 'system', 'registrationterms_init');
+}
+
+elgg_register_elgg_event_handler('init', 'system', 'registrationterms_init');
?> \ No newline at end of file