Elgg  Version 2.3
register.php
Go to the documentation of this file.
1 <?php
15 // check new registration allowed
16 if (elgg_get_config('allow_registration') == false) {
17  register_error(elgg_echo('registerdisabled'));
18  forward();
19 }
20 
21 $friend_guid = (int) get_input('friend_guid', 0);
22 $invitecode = get_input('invitecode');
23 
24 // only logged out people need to register
25 if (elgg_is_logged_in()) {
26  forward();
27 }
28 
29 $title = elgg_echo("register");
30 
31 $form_params = array(
32  'class' => 'elgg-form-account',
33 );
34 
35 $body_params = array(
36  'friend_guid' => $friend_guid,
37  'invitecode' => $invitecode
38 );
40 
41 $content .= elgg_view('help/register');
42 
43 if (elgg_get_config('walled_garden')) {
44  elgg_load_css('elgg.walled_garden');
45  $body = elgg_view_layout('walled_garden', array('content' => $content));
46  echo elgg_view_page($title, $body, 'walled_garden');
47 } else {
48  $body = elgg_view_layout('one_column', array(
49  'title' => $title,
50  'content' => $content,
51  ));
53 }
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
Definition: sessions.php:51
$body
Definition: register.php:7
$invitecode
Definition: register.php:18
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1345
$friend_guid
Definition: register.php:17
$content
Definition: register.php:39
elgg_view_layout($layout_name, $vars=array())
Displays a layout with optional parameters.
Definition: views.php:689
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
$form_params
Definition: register.php:31
$body_params
Definition: register.php:35
$title
Walled garden registration.
Definition: register.php:6
elgg_load_css($name)
Load a CSS file for this page.
Definition: elgglib.php:298
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
elgg_view_page($title, $body, $page_shell= 'default', $vars=array())
Assembles and outputs a full page.
Definition: views.php:447