aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-01 04:51:20 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-01 04:51:20 +0000
commitebd6eabbc2dfecc37009c4d348242293015cd024 (patch)
tree108ee61d029731b2aed1119046ac077f6e04bac1
parent66120761c422ff001ea3556cd00c6bf6853b7065 (diff)
downloadelgg-ebd6eabbc2dfecc37009c4d348242293015cd024.tar.gz
elgg-ebd6eabbc2dfecc37009c4d348242293015cd024.tar.bz2
Fixes #1473: Simple patch to create a view for the registration page.
git-svn-id: http://code.elgg.org/elgg/trunk@3879 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/users.php10
-rw-r--r--views/default/account/forms/login.php2
2 files changed, 11 insertions, 1 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 6a0ad05c4..aaec4fc9f 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1399,6 +1399,14 @@ function dashboard_page_handler($page_elements) {
require_once(dirname(dirname(dirname(__FILE__))) . "/dashboard/index.php");
}
+
+/**
+ * Page handler for registration
+ */
+function registration_page_handler($page_elements) {
+ require_once(dirname(dirname(dirname(__FILE__))) . "/account/register.php");
+}
+
/**
* Sets the last action time of the given user to right now.
*
@@ -1500,6 +1508,8 @@ function users_init() {
register_page_handler('friendsof','friends_of_page_handler');
register_page_handler('collections','collections_page_handler');
register_page_handler('dashboard','dashboard_page_handler');
+ register_page_handler('register','registration_page_handler');
+
register_action("register",true);
register_action("useradd",true);
register_action("friends/add");
diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php
index e8d40729a..394c1ea88 100644
--- a/views/default/account/forms/login.php
+++ b/views/default/account/forms/login.php
@@ -18,7 +18,7 @@ $form_body .= elgg_view('login/extend');
$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div></p>";
$form_body .= "<p class=\"loginbox\">";
-$form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
+$form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . "</a> | " : "";
$form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
$login_url = $vars['url'];