blob: acd890ae155eb088552716519a36db55eb1d7803 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<?php
function registrationterms_init() {
//put the terms agreement at the very end
elgg_extend_view('register/extend', 'registrationterms/register', 1000);
//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);
}
}
elgg_register_elgg_event_handler('init', 'system', 'registrationterms_init');
?>
|