From 7b07f632854ee4cbb3879d4dc0a405d9a09b2932 Mon Sep 17 00:00:00 2001
From: moodler <moodler>
Date: Tue, 31 Aug 2004 10:05:10 +0000
Subject: [PATCH] Merged fix for restricted users from stable

---
 course/loginas.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/course/loginas.php b/course/loginas.php
index 246003aa16..cc55ae042a 100644
--- a/course/loginas.php
+++ b/course/loginas.php
@@ -40,6 +40,8 @@
         error("Only teachers can use this page!");
     }
 
+    check_for_restricted_user($USER->username, "$CFG->wwwroot/user/view.php?id=$user&course=$course->id");
+
     if ($course->category and !isstudent($course->id, $user) and !isadmin()) {
         error("This student is not in this course!");
     }
-- 
2.39.5