]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed access of non-object property in entities lib
authorCash Costello <cash.costello@gmail.com>
Fri, 21 Oct 2011 11:29:46 +0000 (07:29 -0400)
committerCash Costello <cash.costello@gmail.com>
Fri, 21 Oct 2011 11:29:46 +0000 (07:29 -0400)
engine/lib/entities.php

index f1352ba8d178767e5cd0b2f256f6758caa14c8dc..1f64345331b66a19a8e05db066dc1b44f8797230 100644 (file)
@@ -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;
                }
        }