aboutsummaryrefslogtreecommitdiff
path: root/actions/register.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-05 19:14:48 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-05 19:14:48 +0000
commitff31226fdeb972aac2f37f0098240cb366a9bb26 (patch)
tree1f0caa75c9a340cf28ce9a81a4cbe3230d13abf3 /actions/register.php
parent81ffac29fabc175eebdbf95578da046f4f00611b (diff)
downloadelgg-ff31226fdeb972aac2f37f0098240cb366a9bb26.tar.gz
elgg-ff31226fdeb972aac2f37f0098240cb366a9bb26.tar.bz2
Merged 18_new_admin branch to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@5977 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/register.php')
-rw-r--r--actions/register.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/actions/register.php b/actions/register.php
index efbc3def3..081a4e454 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -53,7 +53,21 @@ if (!$CONFIG->disable_registration) {
system_message(sprintf(elgg_echo("registerok"),$CONFIG->sitename));
// Forward on success, assume everything else is an error...
- forward();
+ // If just registered admin user, login the user in and forward to the
+ // plugins simple settings page.
+ if (!datalist_get('first_admin_login')) {
+ login($new_user);
+ // remove the "you've registered!" system_message();
+ $_SESSION['msg']['messages'] = array();
+
+ // remind users to enable / disable desired tools
+ elgg_add_admin_notice('first_installation_plugin_reminder', elgg_echo('firstadminlogininstructions'));
+
+ datalist_set('first_admin_login', time());
+ forward('pg/admin/plugins/simple');
+ } else {
+ forward();
+ }
} else {
register_error(elgg_echo("registerbad"));
}