mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
MDL-42797 require real user login on admin page
This commit is contained in:
parent
e71a5333a3
commit
9d904936c8
1 changed files with 5 additions and 0 deletions
|
@ -505,6 +505,11 @@ if (!$cache) {
|
|||
|
||||
// Check for valid admin user - no guest autologin
|
||||
require_login(0, false);
|
||||
if (isguestuser()) {
|
||||
// Login as real user!
|
||||
$SESSION->wantsurl = (string)new moodle_url('/admin/index.php');
|
||||
redirect(get_login_url());
|
||||
}
|
||||
$context = context_system::instance();
|
||||
require_capability('moodle/site:config', $context);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue