From 7aec51271ee7cdec76cd3b37cc7eaf285464a6f9 Mon Sep 17 00:00:00 2001 From: Fabian Schmid Date: Fri, 26 Feb 2016 15:21:28 +0100 Subject: [PATCH] additional user check --- classes/class.usrtoHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/class.usrtoHelper.php b/classes/class.usrtoHelper.php index bb8871d..8ba0b43 100644 --- a/classes/class.usrtoHelper.php +++ b/classes/class.usrtoHelper.php @@ -33,11 +33,11 @@ public static function getInstance() { /** * @var int */ - protected $original_usr_id = 6; + protected $original_usr_id = 0; /** * @var int */ - protected $temporary_usr_id = 6; + protected $temporary_usr_id = 0; /** @@ -125,7 +125,7 @@ public function switchBack() { protected function checkAccess($usr_id) { global $rbacreview; $pl = ilUserTakeOverPlugin::getInstance(); - if (!isset($usr_id) || !in_array(2, $rbacreview->assignedGlobalRoles($usr_id))) { + if (!isset($usr_id) || $usr_id == 13 || !in_array(2, $rbacreview->assignedGlobalRoles($usr_id))) { ilUtil::sendFailure($pl->txt('no_permission'), true); ilUtil::redirect('login.php');