aboutsummaryrefslogtreecommitdiff
path: root/pages/account/register.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-11 01:36:23 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-11 01:36:23 +0000
commit3bfa294985001c2c6ebb58fbf87b2f795e055ca5 (patch)
tree0c1bef5f9afa3f08da345df333dc1a63ed3ffb21 /pages/account/register.php
parent8c756908c5d72a53b1a4dda0901c8fb3d0191408 (diff)
downloadelgg-3bfa294985001c2c6ebb58fbf87b2f795e055ca5.tar.gz
elgg-3bfa294985001c2c6ebb58fbf87b2f795e055ca5.tar.bz2
Fixes #2640 - elgg_view_layout now uses a parameter array like all the other elgg_view* functions
git-svn-id: http://code.elgg.org/elgg/trunk@7288 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'pages/account/register.php')
-rw-r--r--pages/account/register.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/pages/account/register.php b/pages/account/register.php
index 2638ef561..f18061dfc 100644
--- a/pages/account/register.php
+++ b/pages/account/register.php
@@ -32,15 +32,14 @@ if (!$CONFIG->allow_registration) {
$friend_guid = (int) get_input('friend_guid', 0);
$invitecode = get_input('invitecode');
-// If we're not logged in, display the registration page
-if (!isloggedin()) {
- $area1 = elgg_view_title(elgg_echo("register"));
- $area2 = elgg_view("account/forms/register",
- array('friend_guid' => $friend_guid, 'invitecode' => $invitecode));
-
- echo elgg_view_page(elgg_echo("register"), elgg_view_layout("one_column_with_sidebar", $area1 . $area2));
-
- // Otherwise, forward to the index page
-} else {
+// only logged out people need to register
+if (isloggedin()) {
forward();
}
+
+$area1 = elgg_view_title(elgg_echo("register"));
+$area2 = elgg_view("account/forms/register",
+ array('friend_guid' => $friend_guid, 'invitecode' => $invitecode));
+
+$body = elgg_view_layout("one_column_with_sidebar", array('content' => $area1 . $area2));
+echo elgg_view_page(elgg_echo("register"), $body);