aboutsummaryrefslogtreecommitdiff
path: root/actions/useradd.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/useradd.php')
-rw-r--r--actions/useradd.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/actions/useradd.php b/actions/useradd.php
index be08b4be5..3df41af79 100644
--- a/actions/useradd.php
+++ b/actions/useradd.php
@@ -37,7 +37,7 @@ try {
if ($guid) {
$new_user = get_entity($guid);
- if (($guid) && ($admin)) {
+ if ($uew_user && $admin && elgg_is_admin_logged_in()) {
$new_user->makeAdmin();
}