aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-29 14:43:32 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-29 14:43:32 +0000
commitabb70054a8094360bc406f7346e39fa741dc6427 (patch)
tree9d017454e1794119947c754af76cfd4e5b2fecf7
parent529e6cd5c1dab512e4ae619940cbf1a3b5d03bb6 (diff)
downloadelgg-abb70054a8094360bc406f7346e39fa741dc6427.tar.gz
elgg-abb70054a8094360bc406f7346e39fa741dc6427.tar.bz2
Attempt at an extender canEdit fix
git-svn-id: https://code.elgg.org/elgg/trunk@558 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/extender.php7
1 files changed, 6 insertions, 1 deletions
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);