From: mjollnir_ Date: Fri, 22 Aug 2008 16:35:26 +0000 (+0000) Subject: MDL-15768 - set userobject in the caller before checking permissions. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4dc67f1e92cfbe142051235af9e91774dd245fbe;p=moodle.git MDL-15768 - set userobject in the caller before checking permissions. --- diff --git a/portfolio/add.php b/portfolio/add.php index 927d2a0bfa..545f382e52 100644 --- a/portfolio/add.php +++ b/portfolio/add.php @@ -80,10 +80,10 @@ if ($dataid) { } require_once($CFG->dirroot . $callbackfile); $caller = new $callbackclass($callbackargs); + $caller->set('user', $USER); if (!$caller->check_permissions()) { print_error('nopermissions', 'portfolio', $caller->get_return_url()); } - $caller->set('user', $USER); // for build navigation if (!$course = $caller->get('course')) {