aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/register.php6
-rw-r--r--engine/lib/users.php4
2 files changed, 8 insertions, 2 deletions
diff --git a/actions/register.php b/actions/register.php
index 748c06ce6..fdf2596fc 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -49,8 +49,10 @@
$new_user->admin = 'yes';
}
- // Send user validation request on register only
- request_user_validation($guid);
+ // Send user validation request on register only
+ global $registering_admin;
+ if (!$registering_admin)
+ request_user_validation($guid);
if (!$new_user->admin)
$new_user->disable('new_user'); // Now disable if not an admin
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 92268858c..630be8d80 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1251,9 +1251,13 @@
}
}
+ global $registering_admin;
if (!$admin) {
$user->admin = true;
datalist_set('admin_registered',1);
+ $registering_admin = true;
+ } else {
+ $registering_admin = false;
}
// Turn on email notifications by default