aboutsummaryrefslogtreecommitdiff
path: root/actions/register.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
commitc5cc2821311012a8a4385a304a043c4b41f2afbb (patch)
tree3703351e4b5d56905eb52547d6129ffa14cb2a32 /actions/register.php
parent775a5f08c501acc565c69659022bc31052677485 (diff)
downloadelgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz
elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/register.php')
-rw-r--r--actions/register.php62
1 files changed, 31 insertions, 31 deletions
diff --git a/actions/register.php b/actions/register.php
index 75721822c..5c69624b3 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -1,39 +1,39 @@
-<?php
-
- /**
- * Elgg registration action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg registration action
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
global $CONFIG;
action_gatekeeper();
-
- // Get variables
- $username = get_input('username');
- $password = get_input('password');
- $password2 = get_input('password2');
- $email = get_input('email');
- $name = get_input('name');
- $friend_guid = (int) get_input('friend_guid',0);
- $invitecode = get_input('invitecode');
+
+ // Get variables
+ $username = get_input('username');
+ $password = get_input('password');
+ $password2 = get_input('password2');
+ $email = get_input('email');
+ $name = get_input('name');
+ $friend_guid = (int) get_input('friend_guid',0);
+ $invitecode = get_input('invitecode');
$admin = get_input('admin');
if (is_array($admin)) $admin = $admin[0];
if (!$CONFIG->disable_registration)
- {
+ {
// For now, just try and register the user
- try {
+ try {
if (
(
(trim($password)!="") &&
@@ -49,21 +49,21 @@
$new_user->admin = 'yes';
}
- // Send user validation request on register only
- global $registering_admin;
+ // Send user validation request on register only
+ global $registering_admin;
if (!$registering_admin)
request_user_validation($guid);
if (!$new_user->admin)
- $new_user->disable('new_user', false); // Now disable if not an admin
- // Don't do a recursive disable. Any entities owned by the user at this point
+ $new_user->disable('new_user', false); // Now disable if not an admin
+ // Don't do a recursive disable. Any entities owned by the user at this point
// are products of plugins that
-
+
system_message(sprintf(elgg_echo("registerok"),$CONFIG->sitename));
- forward(); // Forward on success, assume everything else is an error...
- } else {
- register_error(elgg_echo("registerbad"));
+ forward(); // Forward on success, assume everything else is an error...
+ } else {
+ register_error(elgg_echo("registerbad"));
}
} catch (RegistrationException $r) {
register_error($r->getMessage());
@@ -76,6 +76,6 @@
$qs = $qs[0];
$qs .= "?u=" . urlencode($username) . "&e=" . urlencode($email) . "&n=" . urlencode($name) . "&friend_guid=" . $friend_guid;
- forward($qs);
-
+ forward($qs);
+
?> \ No newline at end of file