diff --git a/lib/models/Course.class.php b/lib/models/Course.class.php index 98f2fecd42f5e47770718136126f7a7555385855..34b7d747645716df78394af54076365e7676fe62 100644 --- a/lib/models/Course.class.php +++ b/lib/models/Course.class.php @@ -1096,7 +1096,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe public function isCalendarReadable(?string $user_id = null): bool { if ($user_id === null) { - $user_id = self::findCurrent()->id; + $user_id = User::findCurrent()->id; } //Calendar read permissions are granted for all participants