From: Cash Costello Date: Fri, 21 Oct 2011 11:29:46 +0000 (-0400) Subject: fixed access of non-object property in entities lib X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8133f364fc689e5068b1c4ca70e7cf4057a5694c;p=lorea%2Felgg.git fixed access of non-object property in entities lib --- diff --git a/engine/lib/entities.php b/engine/lib/entities.php index f1352ba8d..1f6434533 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -530,12 +530,12 @@ $container_guid = 0) { $container_guid = $owner_guid; } - $user = elgg_get_logged_in_user_entity(); - if (!can_write_to_container($user->guid, $owner_guid, $type, $subtype)) { + $user_guid = elgg_get_logged_in_user_guid(); + if (!can_write_to_container($user_guid, $owner_guid, $type, $subtype)) { return false; } if ($owner_guid != $container_guid) { - if (!can_write_to_container($user->guid, $container_guid, $type, $subtype)) { + if (!can_write_to_container($user_guid, $container_guid, $type, $subtype)) { return false; } }