aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 17:26:25 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 17:26:25 +0000
commitfbac997a10e9ab2fb3f04b2a33635f3434ddd5e3 (patch)
treebf68792838da5aedf0e71a8764483e99f22d26b5 /engine/lib/users.php
parentbea1ffd84d401c66c544ebacb77f3b996799cb36 (diff)
downloadelgg-fbac997a10e9ab2fb3f04b2a33635f3434ddd5e3.tar.gz
elgg-fbac997a10e9ab2fb3f04b2a33635f3434ddd5e3.tar.bz2
Fixed user GUID and multiple metadata bugs
git-svn-id: https://code.elgg.org/elgg/trunk@510 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 5669da06d..efe2f6f83 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -230,7 +230,7 @@
* @return true|false
*/
function isFriendOf($user_guid) { return user_is_friend($user_guid, $this->getGUID()); }
-
+
/**
* Retrieves a list of this user's friends
*
@@ -270,6 +270,16 @@
*/
public function getCollections($subtype="", $limit = 10, $offset = 0) { return get_user_collections($this->getGUID(), $subtype, $limit, $offset); }
+ /**
+ * If a user's owner is blank, return its own GUID as the owner
+ *
+ * @return int User GUID
+ */
+ function getOwner() {
+ if ($this->owner_guid == 0)
+ return $this->getGUID();
+ }
+
}
/**