[svn r16407] Fix anonymous access to course

skala
Yannick Warnier 16 years ago
parent f5b2561aac
commit a5b860979e
  1. 6
      main/inc/lib/main_api.lib.php

@ -2802,7 +2802,11 @@ function api_is_course_visible_for_user( $userid = null, $cid = null ) {
}
if( empty ($userid) or strval(intval($userid)) != $userid )
{
return false;
if ( api_is_anonymous() ) {
$userid = api_get_anonymous_id();
} else {
return false;
}
}
$cid = Database::escape_string($cid);
global $is_platformAdmin;

Loading…
Cancel
Save