Merge branch 'MDL-56822-master' of git://github.com/cameron1729/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 17 Nov 2016 06:33:39 +0000 (14:33 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 17 Nov 2016 06:33:39 +0000 (14:33 +0800)
message/output/popup/lib.php

index 220515f..a051f93 100644 (file)
@@ -35,7 +35,8 @@ function message_popup_render_navbar_output(\renderer_base $renderer) {
 
     // Early bail out conditions.
     if (!isloggedin() || isguestuser() || user_not_fully_set_up($USER) ||
-        get_user_preferences('auth_forcepasswordchange')) {
+        get_user_preferences('auth_forcepasswordchange') ||
+        (!$USER->policyagreed && $CFG->sitepolicy)) {
         return '';
     }