aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-28 01:48:31 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-28 01:48:31 +0000
commit16e429db64b00e4f1d7a3f703f4bfef7bb59e79e (patch)
tree0e21b26ea9549212bbc19a8d669f847ffff45654
parent3aeb6fcf7a5fab9050803e49af7cab6ea094ba4e (diff)
downloadelgg-16e429db64b00e4f1d7a3f703f4bfef7bb59e79e.tar.gz
elgg-16e429db64b00e4f1d7a3f703f4bfef7bb59e79e.tar.bz2
Fixes #1049, Fixes #1435: Admin-created users and first admin user are marked as validated to prevent inaccurate "Please validate your account" messages and emails.
git-svn-id: http://code.elgg.org/elgg/trunk@3851 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--actions/useradd.php1
-rw-r--r--engine/lib/users.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/actions/useradd.php b/actions/useradd.php
index 71b8d826d..ea0bc66e0 100644
--- a/actions/useradd.php
+++ b/actions/useradd.php
@@ -36,6 +36,7 @@ try {
$new_user->admin_created = true;
$new_user->created_by_guid = get_loggedin_userid();
+ set_user_validation_status($new_user->getGUID(), TRUE, 'admin_created');
notify_user($new_user->guid, $CONFIG->site->guid, elgg_echo('useradd:subject'), sprintf(elgg_echo('useradd:body'), $name, $CONFIG->site->name, $CONFIG->site->url, $username, $password));
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 512b8a6e6..0171e838d 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1298,7 +1298,7 @@ function register_user($username, $password, $name, $email, $allow_multiple_emai
global $registering_admin;
if (!$have_admin) {
$user->admin = true;
- $user->validated = 'admin';
+ set_user_validation_status($user->getGUID(), TRUE, 'first_run');
datalist_set('admin_registered', 1);
$registering_admin = true;
} else {