From fbac997a10e9ab2fb3f04b2a33635f3434ddd5e3 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 21 Apr 2008 17:26:25 +0000 Subject: Fixed user GUID and multiple metadata bugs git-svn-id: https://code.elgg.org/elgg/trunk@510 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/users.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'engine/lib/users.php') 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(); + } + } /** -- cgit v1.2.3