From f78f3fb749641de84cc8eb8e266609d6f9dd7fa1 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Wed, 29 Apr 2015 18:52:46 +0800 Subject: [PATCH] MDL-50038 my: Redirect admin users to the notifications page when needed --- my/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/my/index.php b/my/index.php index 07a808a13c5..c21b001a108 100644 --- a/my/index.php +++ b/my/index.php @@ -46,6 +46,11 @@ $reset = optional_param('reset', null, PARAM_BOOL); require_login(); +$hassiteconfig = has_capability('moodle/site:config', context_system::instance()); +if ($hassiteconfig && moodle_needs_upgrading()) { + redirect(new moodle_url('/admin/index.php')); +} + $strmymoodle = get_string('myhome'); if (isguestuser()) { // Force them to see system default, no editing allowed