Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70351

core_enrol_submit_user_enrolment_form requires sesskey when called by web-service

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 3.9.3
    • Web Services
    • None
    • MOODLE_39_STABLE

      Hello,

      As it was the case for some others web-service functions, it seems that core_enrol_submit_user_enrolment_form needs to be slightly altered in order to be callable from an external web-service.

      I've got it working on my local moodle config by altering the function 'submit_user_enrolment_form' in enrol/externallib.php.

      At line 1141, I appended ", $USER" before the semicolon.

      At line 1148, I added those lines: "
      if(WS_SERVER)

      {     $USER->ignoresesskey =true; }

      ".

      There might be a way to also set "qf__enrol_user_enrolment_form" parameter to one, but I didn't explore this yet.
       
      Hope this helps people / gets implemented.

      Regards,
      Thomas.

            Unassigned Unassigned
            blnwe Thomas DELEPINNE
            Votes:
            9 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.