aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-09 16:54:18 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-09 16:54:18 +0000
commitf5c36149efa0b7adca4cc1e27000d3f5a4d21291 (patch)
tree39878a49964eef968a89d426812c0341c40ef911 /engine/lib/users.php
parent1cdfbf3122ee28047f5f6409cf1c0d6b3ce8902a (diff)
downloadelgg-f5c36149efa0b7adca4cc1e27000d3f5a4d21291.tar.gz
elgg-f5c36149efa0b7adca4cc1e27000d3f5a4d21291.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Added the code to the correct method. Doh! git-svn-id: https://code.elgg.org/elgg/trunk@841 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index ec22db239..33a192005 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -128,7 +128,8 @@
throw new InvalidClassException(sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $guid, get_class()));
// Load missing data
- $row = get_user_entity_as_row($guid);
+ $row = get_user_entity_as_row($guid);
+ if (($row) && (!$this->isFullyLoaded())) $this->attributes['tables_loaded'] ++; // If $row isn't a cached copy then increment the counter
// Now put these into the attributes array as core values
$objarray = (array) $row;
@@ -149,12 +150,7 @@
return false;
// Now save specific stuff
- $result = create_user_entity($this->get('guid'), $this->get('name'), $this->get('username'), $this->get('password'), $this->get('email'), $this->get('language'), $this->get('code'));
-
- // Increment the portion counter
- if ($result) $this->attributes['tables_loaded'] ++;
-
- return $result;
+ return create_user_entity($this->get('guid'), $this->get('name'), $this->get('username'), $this->get('password'), $this->get('email'), $this->get('language'), $this->get('code'));
}
/**