diff --git a/main/admin/add_courses_to_session.php b/main/admin/add_courses_to_session.php index ffa3419038..e3f8fad02e 100644 --- a/main/admin/add_courses_to_session.php +++ b/main/admin/add_courses_to_session.php @@ -48,14 +48,6 @@ if(isset($_GET['add_type']) && $_GET['add_type']!=''){ $add_type = Security::remove_XSS($_REQUEST['add_type']); } -if (!api_is_platform_admin()) { - $sql = 'SELECT session_admin_id FROM '.Database :: get_main_table(TABLE_MAIN_SESSION).' WHERE id='.$id_session; - $rs = Database::query($sql); - if (Database::result($rs,0,0)!=$_user['user_id']) { - api_not_allowed(true); - } -} - $xajax -> processRequests(); $htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/'); diff --git a/main/admin/add_users_to_session.php b/main/admin/add_users_to_session.php index 95a7143aca..1cf8096ef5 100644 --- a/main/admin/add_users_to_session.php +++ b/main/admin/add_users_to_session.php @@ -49,14 +49,6 @@ if(isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){ $add_type = Security::remove_XSS($_REQUEST['add_type']); } -if (!api_is_platform_admin()) { - $sql = 'SELECT session_admin_id FROM '.Database :: get_main_table(TABLE_MAIN_SESSION).' WHERE id='.$id_session; - $rs = Database::query($sql); - if(Database::result($rs,0,0)!=$_user['user_id']) { - api_not_allowed(true); - } -} - //checking for extra field with filter on $extra_field_list= UserManager::get_extra_fields(); @@ -685,4 +677,4 @@ function makepost(select){