aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggEntity.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggEntity.php')
-rw-r--r--engine/classes/ElggEntity.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index 2128a35e9..ea2c52c22 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -705,6 +705,24 @@ abstract class ElggEntity extends ElggData implements
}
/**
+ * Return the guid of the entity's owner.
+ *
+ * @return int The owner GUID
+ */
+ public function getOwner() {
+ return $this->owner_guid;
+ }
+
+ /**
+ * Returns the ElggEntity or child object of the owner of the entity.
+ *
+ * @return ElggEntity The owning user
+ */
+ public function getOwnerEntity() {
+ return get_entity($this->owner_guid);
+ }
+
+ /**
* Returns the UNIX epoch time that this entity was last updated
*
* @return int UNIX epoch time