aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-01-01 15:49:00 -0500
committerCash Costello <cash.costello@gmail.com>2012-01-01 15:49:00 -0500
commit43b4629f7e3d111f2c41ab0cdfd48b38c17db92c (patch)
tree58e1e2f03a1f82471efe0b99eb24a31b6edf85e2 /engine
parent96e403d69956434aadd588fcfb08fb6f0a329d9c (diff)
downloadelgg-43b4629f7e3d111f2c41ab0cdfd48b38c17db92c.tar.gz
elgg-43b4629f7e3d111f2c41ab0cdfd48b38c17db92c.tar.bz2
Fixes #690 admin editing a user no longer makes them appear active
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/users.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 1d67bc463..362488718 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -60,13 +60,12 @@ function create_user_entity($guid, $name, $username, $password, $salt, $email, $
$row = get_entity_as_row($guid);
if ($row) {
// Exists and you have access to it
-
$query = "SELECT guid from {$CONFIG->dbprefix}users_entity where guid = {$guid}";
if ($exists = get_data_row($query)) {
$query = "UPDATE {$CONFIG->dbprefix}users_entity
- set name='$name', username='$username', password='$password', salt='$salt',
- email='$email', language='$language', code='$code', last_action = "
- . time() . " where guid = {$guid}";
+ SET name='$name', username='$username', password='$password', salt='$salt',
+ email='$email', language='$language', code='$code'
+ WHERE guid = $guid";
$result = update_data($query);
if ($result != false) {
@@ -79,7 +78,7 @@ function create_user_entity($guid, $name, $username, $password, $salt, $email, $
}
}
} else {
- // Update failed, attempt an insert.
+ // Exists query failed, attempt an insert.
$query = "INSERT into {$CONFIG->dbprefix}users_entity
(guid, name, username, password, salt, email, language, code)
values ($guid, '$name', '$username', '$password', '$salt', '$email', '$language', '$code')";
@@ -90,7 +89,7 @@ function create_user_entity($guid, $name, $username, $password, $salt, $email, $
if (elgg_trigger_event('create', $entity->type, $entity)) {
return $guid;
} else {
- $entity->delete(); //delete_entity($guid);
+ $entity->delete();
}
}
}