{"action":"created","issue":{"url":"https://api.github.com/repos/TobiasFranek/webuntis/issues/36","repository_url":"https://api.github.com/repos/TobiasFranek/webuntis","labels_url":"https://api.github.com/repos/TobiasFranek/webuntis/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/TobiasFranek/webuntis/issues/36/comments","events_url":"https://api.github.com/repos/TobiasFranek/webuntis/issues/36/events","html_url":"https://github.com/TobiasFranek/webuntis/issues/36","id":355887098,"node_id":"MDU6SXNzdWUzNTU4ODcwOTg=","number":36,"title":"no Model available for the user type: \"0\" ","user":{"login":"loetmann","id":87509,"node_id":"MDQ6VXNlcjg3NTA5","avatar_url":"https://avatars1.githubusercontent.com/u/87509?v=4","gravatar_id":"","url":"https://api.github.com/users/loetmann","html_url":"https://github.com/loetmann","followers_url":"https://api.github.com/users/loetmann/followers","following_url":"https://api.github.com/users/loetmann/following{/other_user}","gists_url":"https://api.github.com/users/loetmann/gists{/gist_id}","starred_url":"https://api.github.com/users/loetmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loetmann/subscriptions","organizations_url":"https://api.github.com/users/loetmann/orgs","repos_url":"https://api.github.com/users/loetmann/repos","events_url":"https://api.github.com/users/loetmann/events{/privacy}","received_events_url":"https://api.github.com/users/loetmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-31T08:29:04Z","updated_at":"2018-08-31T08:50:55Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\njust installed your library and everything looks good so far, but every time I issue queriessr relating to users I'll get:\r\n\r\nFatal error: Uncaught Webuntis\\Exceptions\\ModelException: There is no Model available for the user type: \"0\" in /Users/ralfk/PhpstormProjects/webuntis/vendor/tfranek/webuntis/src/Webuntis.php:98\r\nStack trace:\r\n#0 /Users/ralfk/PhpstormProjects/webuntis/vendor/tfranek/webuntis/src/Repositories/PeriodRepository.php(38): Webuntis\\Webuntis->getCurrentUser()\r\n#1 /Users/ralfk/PhpstormProjects/webuntis/test1.php(67): Webuntis\\Repositories\\PeriodRepository->findBy(Array)\r\n#2 {main}\r\n  thrown in /Users/ralfk/PhpstormProjects/webuntis/vendor/tfranek/webuntis/src/Webuntis.php on line 98\r\n\r\n\r\nExample: \r\n\r\n$test = $query->get('Period')->findBy(['teachers:name' => 'We']);\r\n\r\nObviously there is a Problem with getCurrentUser() and getCurrentUserType(). I use a config with dsiable_cache and only_admin set to true.\r\n\r\nThe Admin User is a simple User with appropriate rights and roles in Webuntis. As a saw in another thread you distinguish UserTypes only for 2 and 5.\r\n\r\nAllthough the documentation is very minimalistic I love your approach. Only thing missing: some more examples in the documentation and the booking stuff for resources, rooms etc.\r\n\r\nRegards\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/TobiasFranek/webuntis/issues/comments/417598375","html_url":"https://github.com/TobiasFranek/webuntis/issues/36#issuecomment-417598375","issue_url":"https://api.github.com/repos/TobiasFranek/webuntis/issues/36","id":417598375,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzU5ODM3NQ==","user":{"login":"TobiasFranek","id":9990098,"node_id":"MDQ6VXNlcjk5OTAwOTg=","avatar_url":"https://avatars2.githubusercontent.com/u/9990098?v=4","gravatar_id":"","url":"https://api.github.com/users/TobiasFranek","html_url":"https://github.com/TobiasFranek","followers_url":"https://api.github.com/users/TobiasFranek/followers","following_url":"https://api.github.com/users/TobiasFranek/following{/other_user}","gists_url":"https://api.github.com/users/TobiasFranek/gists{/gist_id}","starred_url":"https://api.github.com/users/TobiasFranek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TobiasFranek/subscriptions","organizations_url":"https://api.github.com/users/TobiasFranek/orgs","repos_url":"https://api.github.com/users/TobiasFranek/repos","events_url":"https://api.github.com/users/TobiasFranek/events{/privacy}","received_events_url":"https://api.github.com/users/TobiasFranek/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T08:50:55Z","updated_at":"2018-08-31T08:50:55Z","author_association":"OWNER","body":"later that day i will try to put out a new release that adresses these issues so if you have any suggestion please let me know"}}
{"actor":{"display_login":"TobiasFranek"}}