aboutsummaryrefslogtreecommitdiff
path: root/pages/account/register.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-15 02:15:39 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-15 02:15:39 +0000
commite2ecdb543fdf4ac0adf7097c979e74950c39165e (patch)
treeeb6b9addd1c4a0afc9f221f56613f3e7a792cd1d /pages/account/register.php
parentcbc74d984665a8bc0de18e0fa7c2fe270e9b7476 (diff)
downloadelgg-e2ecdb543fdf4ac0adf7097c979e74950c39165e.tar.gz
elgg-e2ecdb543fdf4ac0adf7097c979e74950c39165e.tar.bz2
moved account forms into forms directory
git-svn-id: http://code.elgg.org/elgg/trunk@7623 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'pages/account/register.php')
-rw-r--r--pages/account/register.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/pages/account/register.php b/pages/account/register.php
index 76319e0d6..9aa835b9c 100644
--- a/pages/account/register.php
+++ b/pages/account/register.php
@@ -2,7 +2,7 @@
/**
* Assembles and outputs the registration page.
*
- * Since 1.8 registration can be disabled via administration. If this is
+ * Since 1.8, registration can be disabled via administration. If this is
* the case, calls to this page will forward to the network front page.
*
* If the user is logged in, this page will forward to the network
@@ -12,17 +12,6 @@
* @subpackage Registration
*/
-/**
- * Start the Elgg engine
- *
- * Why?
- * Tthere _might_ exist direct calls to this file, requiring the engine
- * to be started. Logic for both cases follow.
- *
- * @todo remove as direct calls were deprecated in 1.7
- */
-require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
// check new registration allowed
if (elgg_get_config('allow_registration') == false) {
register_error(elgg_echo('registerdisabled'));
@@ -37,11 +26,23 @@ if (isloggedin()) {
forward();
}
-$area1 = elgg_view_title(elgg_echo("register"));
-$area2 = elgg_view("account/forms/register", array(
+$title = elgg_echo("register");
+
+$content = elgg_view_title($title);
+
+// create the registration url - including switching to https if configured
+$register_url = elgg_get_site_url() . 'action/register';
+if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+ $register_url = str_replace("http:", "https:", $register_url);
+}
+$form_params = array('action' => $register_url);
+
+$body_params = array(
'friend_guid' => $friend_guid,
- 'invitecode' => $invitecode)
+ 'invitecode' => $invitecode
);
+$content .= elgg_view_form('register', $form_params, $body_params);
+
+$body = elgg_view_layout("one_column_with_sidebar", array('content' => $content));
-$body = elgg_view_layout("one_column_with_sidebar", array('content' => $area1 . $area2));
-echo elgg_view_page(elgg_echo("register"), $body);
+echo elgg_view_page($title, $body);