Reputation: 33
I'm trying to integrate Moodle with an external system, the main idea is that when a user is register to the external system it should be register in Moodle simultaneously.
In order to achieve this, I need to use web services on Moodle, specifically: "auth_email_signup_user"
I followed the instruction from the following Moodle document: Using web services
My idea is to use REST protocol and use the token of Admin user.
However, when I call the register service the Moodle server is returning me:
<?xml version="1.0" encoding="UTF-8" ?>
<EXCEPTION class="moodle_exception">
<ERRORCODE>registrationdisabled</ERRORCODE>
<MESSAGE>Registration is disabled on this site</MESSAGE>
</EXCEPTION>
Upvotes: 0
Views: 1061
Reputation: 558
Does your moodle allow self registration? See https://docs.moodle.org/36/en/Reducing_spam_in_Moodle#Allowing_self-registration
Nevertheless, it would be much more secure writing your own plugin exposing a registration webservice. Also avoid using a admin token, create a custom user and role for this plugin
Upvotes: 1