aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/useradd.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/actions/useradd.php b/actions/useradd.php
index f7a96b037..b59dc36b1 100644
--- a/actions/useradd.php
+++ b/actions/useradd.php
@@ -35,12 +35,11 @@
) &&
($guid = register_user($username, $password, $name, $email, true))
) {
+ $new_user = get_entity($guid);
if (($guid) && ($admin))
- {
-
- $new_user = get_entity($guid);
$new_user->admin = 'yes';
- }
+
+ $new_user->admin_created = true;
system_message(sprintf(elgg_echo("adduser:ok"),$CONFIG->sitename));
} else {