From abb70054a8094360bc406f7346e39fa741dc6427 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 29 Apr 2008 14:43:32 +0000 Subject: Attempt at an extender canEdit fix git-svn-id: https://code.elgg.org/elgg/trunk@558 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/extender.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engine/lib') diff --git a/engine/lib/extender.php b/engine/lib/extender.php index c2d4bcc96..7cbc647af 100644 --- a/engine/lib/extender.php +++ b/engine/lib/extender.php @@ -276,10 +276,15 @@ function can_edit_extender($extender_id, $type, $user_guid = 0) { if ($user_guid == 0) { - $user = $_SESSION['user']; + if (isset($_SESSION['user'])) { + $user = $_SESSION['user']; + } else { + $user = null; + } } else { $user = get_entity($user_guid); } + $functionname = "get_{$type}"; if (is_callable($functionname)) { $extender = $functionname($extender_id); -- cgit v1.2.3