MDL-48776 core_message: Fixed userid check.

Thanks to Oleg Demeshev for providing the patch.
This commit is contained in:
Dave Cooper
2015-01-19 15:21:03 +08:00
parent 2ea6a2b161
commit 5c703c83fd
+5 -1
View File
@@ -25,9 +25,13 @@
require_once(dirname(__FILE__) . '/../config.php');
require_once($CFG->dirroot . '/message/lib.php');
$userid = optional_param('id', $USER->id, PARAM_INT); // user id
$userid = optional_param('id', 0, PARAM_INT); // User id.
$disableall = optional_param('disableall', 0, PARAM_BOOL); //disable all of this user's notifications
if (!$userid) {
$userid = $USER->id;
}
$url = new moodle_url('/message/edit.php');
$url->param('id', $userid);