aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggData.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggData.php')
-rw-r--r--engine/classes/ElggData.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/engine/classes/ElggData.php b/engine/classes/ElggData.php
index a206964fa..b21646df1 100644
--- a/engine/classes/ElggData.php
+++ b/engine/classes/ElggData.php
@@ -4,8 +4,23 @@ abstract class ElggData implements
Iterator, // Override foreach behaviour
ArrayAccess // Override for array access
{
-
-
+ /**
+ * 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->getOwner());
+ }
/*
* SYSTEM LOG INTERFACE