Merge branch 'MDL-64394-accesslog' of https://github.com/brendanheywood/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 3 May 2019 00:49:33 +0000 (08:49 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 3 May 2019 00:49:33 +0000 (08:49 +0800)
1  2 
lib/moodlelib.php
lib/setuplib.php

@@@ -2699,10 -2692,7 +2699,11 @@@ function require_login($courseorid = nu
                  $authplugin = get_auth_plugin($authname);
                  $authplugin->pre_loginpage_hook();
                  if (isloggedin()) {
 +                    if ($cm) {
 +                        $modinfo = get_fast_modinfo($course);
 +                        $cm = $modinfo->get_cm($cm->id);
 +                    }
+                     set_access_log_user();
                      break;
                  }
              }
Simple merge