aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-02 12:40:38 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-02 12:40:38 +0000
commit4cf87cd1f558593fe7047440806bc6b7d32e83ee (patch)
treeeff1ceef115a0977cfc8988f6ca88ae3afd455e7 /engine/lib/users.php
parentdb727a00f06d95da0b6d3a3356b1d60c01feabe3 (diff)
downloadelgg-4cf87cd1f558593fe7047440806bc6b7d32e83ee.tar.gz
elgg-4cf87cd1f558593fe7047440806bc6b7d32e83ee.tar.bz2
The system now uses the site GUID to get and set entity data. Also, installation is a great deal more visual.
git-svn-id: https://code.elgg.org/elgg/trunk@621 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 90b7622ae..a28a09ac3 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -576,6 +576,10 @@
return false;
}
+ // Check to see if we've registered the first admin yet.
+ // If not, this is the first admin user!
+ $admin = datalist_get('admin_registered');
+
// Otherwise ...
$user = new ElggUser();
$user->username = $username;
@@ -585,6 +589,11 @@
$user->access_id = 2;
$user->save();
+ if (!$admin) {
+ $user->admin = true;
+ datalist_set('admin_registered',1);
+ }
+
return $user->getGUID();