Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
MDL-42797 require real user login on admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jan 1, 2014
1 parent bbb291b commit fc1d0e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,11 @@

// 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);

Expand Down

0 comments on commit fc1d0e8

Please sign in to comment.