REST Service for POPCORN - ILIAS
alex
2025-06-23 6bd25593d8533f491a268b05ffe986bab1683eca
php/globus-ilias-rest/api.php
@@ -50,6 +50,15 @@
                    $res["status"] = "ok";
                    break;
                }
            case "getUser":
                if($method == "GET") {
                    $usr_id = (int) $_GET["usr_id"];
                    $res["usr_id"] = $usr_id;
                    $usr = getUser($usr_id);
                    $res["data"] = $usr;
                    $res["status"] = "ok";
                    break;
                }
            case "importUser":
                if ($method == "POST") {
                    $body = file_get_contents('php://input');
@@ -93,6 +102,11 @@
###############################
function getUser($usr_id) {
    $usr = ilObjectFactory::getInstanceByObjId($usr_id);
    return $usr;
}
function importUser($data) {
    $user = new ilObjUser();
    $user->assignData($data);