aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
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();
+ }
+
}
/**