function validate_seminar_permission($ticket, $seminar_id, $permission) { $username = StudipSessionHelper::get_session_username($ticket); if (in_array($username, StudipSeminarHelper::get_participants($seminar_id, $permission)) || in_array($username, StudipSeminarHelper::get_admins_for_seminar($seminar_id))) { return $username; } else { return false; } }
function get_prefixed_session_username_action($api_key, $session_id) { if ($GLOBALS['STUDIP_INSTALLATION_ID']) { $prefix = $GLOBALS['STUDIP_INSTALLATION_ID']; } else { $prefix = $GLOBALS['HTTP_SERVER']['HTTP_HOST']; } return $prefix . "#" . StudipSessionHelper::get_session_username($session_id); }