I've created a new topic here because I think this question doesn't belongs to that post http://www.docebo.com/community/doceboCms/forum/9_1/message/idThread_5803-ini_1-result_ok/Rest_API_broke_in_4_0_x%3F.html.
I'd like to create new users and subscribe them to a course directly by api, I don't see how to do it in the api documentation : http://www.docebo.com/community/doceboCms/wiki/129_327/show/english/0/createuser
But I've seen the function CreateUser in api.user.php that course can be assigned (if I understand well the source code)
line 116 :
//apply enroll rules
$enrollrules = new EnrollrulesAlms();
$course_list = $enrollrules->getApplicableRuleForNewUser($userdata['language']);
if(!empty($entities)) {
$course_entity_list = $enrollrules->getApplicableRuleForEntity($entities, $userdata['language']);
$course_list = array_merge($course_list, $course_entity_list);
}
// do the subscription
if(!empty($course_list)) {
require_once(_lms_.'/lib/lib.subscribe.php');
$cs = new CourseSubscribe_Management();
$course_list = array_unique($course_list);
$cs->multipleUserSubscribe($user_idst, $course_list, 3);
}How I can use or make a subscription to course with api (or with createuser function) ?
Thank you for help :)
Kinny







