summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-04 11:19:02 -0800
committerZach Copley <zach@status.net>2010-03-04 11:19:02 -0800
commit980d1a66ec0bb5b42ddb39e253fba9bad1b41aca (patch)
tree5f34622397d3da731e233edaffcf69d75f58f0c5 /install.php
parentfc3b53853f177e98c10f44c14a3125221ce3e83c (diff)
parentbe4b482f13615fb603736cb1e906efb4a9e06fd0 (diff)
Merge branch 'testing' of gitorious.org:statusnet/mainline into testinglist0.9.0
* 'testing' of gitorious.org:statusnet/mainline: Updated note on geo location and added a note on user roles Set up subscription to update@status.net for admin user on new installation, if OStatus is set up and working. (Will fail gracefully on a behind-the-firewall site.)
Diffstat (limited to 'install.php')
-rw-r--r--install.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/install.php b/install.php
index bb53e2b55..8c9b6138b 100644
--- a/install.php
+++ b/install.php
@@ -865,6 +865,19 @@ function registerInitialUser($nickname, $password, $email)
$user->grantRole('owner');
$user->grantRole('moderator');
$user->grantRole('administrator');
+
+ // Attempt to do a remote subscribe to update@status.net
+ // Will fail if instance is on a private network.
+
+ if (class_exists('Ostatus_profile')) {
+ try {
+ $oprofile = Ostatus_profile::ensureProfile('http://update.status.net/');
+ Subscription::start($user->getProfile(), $oprofile->localProfile());
+ updateStatus("Set up subscription to <a href='http://update.status.net/'>update@status.net</a>.");
+ } catch (Exception $e) {
+ updateStatus("Could not set up subscription to <a href='http://update.status.net/'>update@status.net</a>.");
+ }
+ }
return true;
}