aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/entities.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index b83b9f4b5..87ace72d7 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -654,7 +654,8 @@
$entity = get_entity($guid);
- if ($entity->canEdit()) {
+ if ($entity->canEdit()) {
+
if (trigger_event('update',$entity->type,$entity)) {
return update_data("UPDATE {$CONFIG->dbprefix}entities set owner_guid='$owner_guid', access_id='$access_id', time_updated='$time' WHERE guid=$guid");
}
@@ -976,10 +977,10 @@
}
} else {
$user = get_entity($user_guid);
- }
- if ($entity = get_entity($entity_guid) && !is_null($user)) {
+ }
+
+ if (($entity = get_entity($entity_guid)) && (!is_null($user))) {
- $entity = get_entity($entity_guid);
if ($entity->getOwner() == $user->getGUID()) return true;
if ($entity->type == "user" && $entity->getGUID() == $user->getGUID()) return true;